def _get_cache(vcf_fn, array_type, region, cachedir, log):

    # guard condition
    if isinstance(vcf_fn, (list, tuple)):
        raise Exception(
            'caching only supported when loading from a single VCF file'
        )

    # create cache file name
    cache_fn = _mk_cache_fn(vcf_fn, array_type=array_type, region=region,
                            cachedir=cachedir)

    # decide whether or not a fresh cache file is available
    # (if not, we will parse the VCF and build array from scratch)
    if not os.path.exists(cache_fn):
        log('no cache file found')
        is_cached = False
    elif os.path.getmtime(vcf_fn) > os.path.getmtime(cache_fn):
        is_cached = False
        log('cache file out of date')
    else:
        is_cached = True
        log('cache file available')

    return cache_fn, is_cached
Setup a recurring transaction
dataset/ETHPy150Open alimanfoo/vcfnp/vcfnp/array.py/_get_cache--crossover with--dataset/ETHPy150Open agiliq/merchant/billing/gateway.py/Gateway.recurring