idmtools.core.cache_enabled module

class idmtools.core.cache_enabled.CacheEnabled

Bases: object

Allows a class to leverage Diskcache and expose a cache property.

initialize_cache(shards: Optional[int] = None, eviction_policy=None)

Initialize cache

Parameters
  • shards (Optional[int], optional) – How many shards. It is best to set this when multi-procressing Defaults to None.

  • eviction_policy ([type], optional) – See Diskcache docs. Defaults to None.

cleanup_cache()
property cache