in_memory#

class pynamodb_mate.patterns.cache.backend.in_memory.InMemoryBackend[source]#

Base class for in-memory cache backend. You have to implement your own serialize() and deserialize() methods before use.

clear_all()[source]#

Disable all records in cache.

clear_expired()[source]#

Disable all expired records in cache.

class pynamodb_mate.patterns.cache.backend.in_memory.JsonDictInMemoryCache[source]#

A built-in In memory cache designed to store JSON serializable dict.

serialize(value: dict) bytes[source]#

Abstract serialization function that convert the original value to binary data.

deserialize(value: bytes) dict[source]#

Abstract deserialization function the recover the original value from binary data.

class pynamodb_mate.patterns.cache.backend.in_memory.JsonListInMemoryCache[source]#

A built-in In memory cache designed to store JSON serializable list.

serialize(value: list) bytes[source]#

Abstract serialization function that convert the original value to binary data.

deserialize(value: bytes) list[source]#

Abstract deserialization function the recover the original value from binary data.