get_adapter¶
-
static
CacheWrapper.
get_adapter
(default: Type[privex.helpers.cache.CacheAdapter.CacheAdapter] = <class 'privex.helpers.cache.MemoryCache.MemoryCache'>, *args, **kwargs) → privex.helpers.cache.CacheAdapter.CacheAdapter[source]¶ Attempt to get the singleton cache adapter from
cache_instance
- if the instance isNone
, then attempt to instantiatedefault()
If any
*args
or**kwargs
are passed, they will be passed through todefault(*args, **kwargs)
so that any necessary configuration parameters can be passed to the class.