mirage.tools package#

Subpackages#

Module contents#

mirage.tools.cache(function: Callable) → Callable#

Wraps a function with the shared joblib disk cache.

Parameters:

function (Callable) – Function to cache

Returns:

Cached function wrapper

Return type:

Callable

mirage.tools.cache_method(*state_attrs: str) → Callable#

Cache a method, keyed on the named instance attributes plus call arguments.

Parameters:

state_attrs (str) – Names of instance attributes that form part of the cache key

Returns:

Method decorator

Return type:

Callable