multi_layer#
- class pynamodb_mate.patterns.cache.multi_layer.MultiLayerCache(cache_list: List[AbstractCache])[source]#
Combine multiple cache backend together.
For example, you could define a cache that prefer to use in-memory cache, then dynamodb cache.
Set value logic: update in-memory cache, then dynamodb cache
- Get value logic: try to get value from in-memory cache, if not hit,
then try dynamodb cache.
- class pynamodb_mate.patterns.cache.multi_layer.JsonDictMultiLayerCache(cache_list: List[AbstractCache])[source]#
- class pynamodb_mate.patterns.cache.multi_layer.JsonListMultiLayerCache(cache_list: List[AbstractCache])[source]#