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 implements CacheAdapter

Example:

>>> from privex.helpers import cache
>>> cache.adapter_set(cache.MemoryCache())
Parameters

adapter (CacheAdapter) – An instance of a class which implements CacheAdapter for global use.

Return CacheAdapter adapter

A reference to your adapter from __STORE['adapter']