store.cache.backends.filecache

Classes

FileCache

Module Contents

class store.cache.backends.filecache.FileCache(cache_configuration: Any)

Bases: e3.store.cache.backends.base.Cache

cache_suffix = '.cache'
cache_dir
clear() None
delete(uid: str) None
_create_cache_dir() None
uid_to_file(uid: str) str

Convert a resource uid to a cache file path.

This backend assumes that the uid is a safe value for a file name. :param uid: the resource uid

static _is_expired(fd: IO[bytes]) bool

Determine if an open cache file has expired.

Automatically delete the file if it has passed its expiry time.

get(uid: str, default: Any = None) Any
set(uid: str, value: Any, timeout: int = DEFAULT_TIMEOUT) bool