core.db.cache ============= .. py:module:: core.db.cache Attributes ---------- .. autoapisummary:: core.db.cache.MEMCACHE_MAX_BATCH_SIZE core.db.cache.MEMCACHE_NAMESPACE core.db.cache.MEMCACHE_TIMEOUT core.db.cache.MEMCACHE_MAX_SIZE Functions --------- .. autoapisummary:: core.db.cache.get core.db.cache.put core.db.cache.delete core.db.cache.flush Module Contents --------------- .. py:data:: MEMCACHE_MAX_BATCH_SIZE :value: 30 .. py:data:: MEMCACHE_NAMESPACE :value: 'viur-datastore' .. py:data:: MEMCACHE_TIMEOUT :type: int | datetime.timedelta .. py:data:: MEMCACHE_MAX_SIZE :type: Final[int] :value: 1000000 .. py:function:: get(keys, namespace = None) Reads data form the memcache. :param keys: Unique identifier(s) for one or more entry(s). :param namespace: Optional namespace to use. :return: The entity (or None if it has not been found), or a list of entities. .. py:function:: put(data, namespace = None, timeout = None) Writes Data to the memcache. :param data: Data to write :param namespace: Optional namespace to use. :param timeout: Optional timeout in seconds or a timedelta object. :return: A boolean indicating success. .. py:function:: delete(keys, namespace = None) Deletes an Entry form memcache. :param keys: Unique identifier(s) for one or more entry(s). :param namespace: Optional namespace to use. .. py:function:: flush() Deletes everything in memcache. :return: A boolean indicating success.