CacheAdapter¶
-
class
privex.helpers.cache.CacheAdapter.
CacheAdapter
(*args, enter_reconnect: Optional[bool] = None, exit_close: Optional[bool] = None, **kwargs)[source]¶ CacheAdapter is an abstract base class which scaffolds methods for implementing a Cache, allowing for consistent methods and method signatures across all child classes which implement it.
This class cannot be instantiated by itself, only child classes which extend
CacheAdapter
and implement all methods marked with@abstractmethod
can be instantiated.For an example implementation of CacheAdapter, see
privex.helpers.cache.MemoryCache
Methods¶
Methods
|
Initialize self. |
|
Return the value of cache key |
|
Attempt to return the value of |
|
Async coroutine compatible version of |
|
Remove one or more keys from the cache. |
|
Set the cache key |
|
Update the timeout for a given |