adapter_set¶
-
privex.helpers.cache.adapter_set(adapter: privex.helpers.cache.CacheAdapter.CacheAdapter)[source]¶ Set the global cache adapter instance to
adapter- which should be an instantiated adapter class which implementsCacheAdapterExample:
>>> from privex.helpers import cache >>> cache.adapter_set(cache.MemoryCache())
- Parameters
adapter (CacheAdapter) – An instance of a class which implements
CacheAdapterfor global use.- Return CacheAdapter adapter
A reference to your adapter from
__STORE['adapter']