CacheSettings

class privex.helpers.cache.extras.CacheSettings(cache_prefix: str = 'pvx_cmgr', cache_key_log_name: str = 'all_cache_keys', cache_sep: str = ':', default_cache_key_time: Union[float, int] = 300, default_cache_time: Union[float, int] = 300, gen_cache_key: Callable[[Any], str] = None, key_add_prefix: Callable[[Any], str] = None)[source]
__init__(cache_prefix: str = 'pvx_cmgr', cache_key_log_name: str = 'all_cache_keys', cache_sep: str = ':', default_cache_key_time: Union[float, int] = 300, default_cache_time: Union[float, int] = 300, gen_cache_key: Callable[[Any], str] = None, key_add_prefix: Callable[[Any], str] = None)None

Method generated by attrs for class CacheSettings.

cache_key_log_name: str

The cache key name component for the key used to store a list of all known cache keys for your class

cache_prefix: str

The prefix used for all cache keys generated for your class

cache_sep: str

Separator character(s) used between identifying components within a cache key

default_cache_key_time: Union[float, int]

Default number of seconds to cache the log of known cache keys

default_cache_time: Union[float, int]

Default number of seconds to cache any objects

Methods

Methods

__init__([cache_prefix, cache_key_log_name, …])

Method generated by attrs for class CacheSettings.

from_class(obj)

gen_cache_key(*args[, _auto_cache, …])

key_add_prefix(key[, auto_prefix, …])