toucan_data_sdk/utils/decorators.py
def setup_cachedir(cachedir, mmap_mode=None, bytes_limit=None):
    """ This function injects a joblib.Memory object in the cache() function
        (in a thread-specific slot of its 'memories' attribute). """
    if not hasattr(cache, 'memories'):
        cache.memories = {}

    memory = joblib.Memory(
        location=cachedir,
        verbose=0,
        mmap_mode=mmap_mode,
        bytes_limit=bytes_limit,
    )
    cache.memories[current_thread().name] = memory
    return memory
def setup_cachedir(cachedir, mmap_mode=None, bytes_limit=None):
    """ This function injects a joblib.Memory object in the cache() function
        (in a thread-specific slot of its 'memories' attribute). """
    if not hasattr(cache, 'memories'):
        cache.memories = {}

    memory = joblib.Memory(
        location=cachedir,
        verbose=0,
        mmap_mode=mmap_mode,
        bytes_limit=bytes_limit,
    )
    cache.memories[current_thread().name] = memory
    return memory
def setup_cachedir ( cachedir , mmap_mode = None , bytes_limit = None ) : if not hasattr ( cache , 'memories' ) : cache . memories = { } memory = joblib . Memory ( location = cachedir , verbose = 0 , mmap_mode = mmap_mode , bytes_limit = bytes_limit , ) cache . memories [ current_thread ( ) . name ] = memory return memory
This function injects a joblib.Memory object in the cache() function
        (in a thread-specific slot of its 'memories' attribute).
This function injects a joblib . Memory object in the cache () function ( in a thread - specific slot of its memories attribute ) .