ahvn.cache.disk_cache module¶
Disk-based cache powered by the ‘diskcache’ library.
- class ahvn.cache.disk_cache.DiskCache(path, size_limit=int(32e9), exclude=None, *args, **kwargs)[source]¶
Bases:
BaseCacheAn implementation of BaseCache that stores data on disk using diskcache.
- __init__(path, size_limit=int(32e9), exclude=None, *args, **kwargs)[source]¶
Initialization.
- Parameters:
path (str) – Path to the directory where cache files will be stored.
size_limit (int) – Maximum size of the cache in bytes. Defaults to 32e9 (32 GB).
exclude (Optional[Iterable[str]]) – Keys to exclude from inputs when creating cache entries.
*args – Additional positional arguments.
**kwargs – Additional keyword arguments.