idmtools.core.cache_enabled module¶
CacheEnabled definition. CacheEnabled enables diskcache wrapping on an item.
Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.
- class idmtools.core.cache_enabled.CacheEnabled¶
Bases:
object
Allows a class to leverage Diskcache and expose a cache property.
- cleanup_cache()¶
Cleanup our cache.
- Returns:
None
- property cache: Union[diskcache.core.Cache, diskcache.fanout.FanoutCache]¶
Allows fetches of cache and ensures it is initialized.
- Returns:
Cache