__init__

AsyncMemcachedCache.__init__(use_pickle: bool = None, mcache_instance: aiomcache.client.Client = None, *args, **kwargs)[source]

AsyncMemcachedCache by default uses the global Memcached instance from privex.helpers.plugin.

It’s recommended to use privex.helpers.plugin.configure_memcached_async() if you need to change any Memcached settings, as this will adjust the global settings and re-instantiate the global instance if required.

Alternatively, you may pass an instance of aiomcache.Client as mcache_instance, then that will be used instead of the global instance from get_memcached_async()

Parameters
  • use_pickle (bool) – (Default: True) Use the built-in pickle to serialise values before storing in Memcached, and un-serialise when loading from Memcached

  • mcache_instance (aiomcache.Client) – If this isn’t None / False, then this Memcached instance will be used instead of the global one from get_memcached_async()