core.cache.redis

Attributes

keys

flush

Classes

RedisCacheRegion

A slightly more specific CacheRegion that will be configured

Functions

msgpack_deserialize(→ Any)

get(→ RedisCacheRegion)

get_pool(→ redis.ConnectionPool)

Module Contents

core.cache.redis.msgpack_deserialize(value: bytes | dogpile.cache.api.NoValue) Any[source]
class core.cache.redis.RedisCacheRegion(namespace: str, expiration_time: float, redis_url: str)[source]

Bases: dogpile.cache.CacheRegion

A slightly more specific CacheRegion that will be configured to a single non-clustered Redis backend with name-mangling based on a given namespace as well as a couple of additional convenience methods specific to Redis.

It will use dill to serialize/deserialize values.

namespace[source]
key_mangler(key: str) bytes[source]
keys() list[str][source]
flush() int[source]
core.cache.redis.keys[source]
core.cache.redis.flush[source]
core.cache.redis.get(namespace: str, expiration_time: float, redis_url: str) RedisCacheRegion[source]
core.cache.redis.get_pool(redis_url: str) redis.ConnectionPool[source]