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)[源代码]

基类:BaseCache

An implementation of BaseCache that stores data on disk using diskcache.

参数:
__init__(path, size_limit=int(32e9), exclude=None, *args, **kwargs)[源代码]

Initialization.

参数:
  • 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.

close()[源代码]

Closes the cache.

返回类型:

None