pynenc_redis.client_data_store.redis_client_data_store

Module Contents

Classes

RedisClientDataStore

Redis-based implementation of argument caching.

API

class pynenc_redis.client_data_store.redis_client_data_store.RedisClientDataStore(app: pynenc.app.Pynenc)[source]

Bases: pynenc.client_data_store.base_client_data_store.BaseClientDataStore

Redis-based implementation of argument caching.

Stores serialized arguments in Redis for distributed access. Suitable for production use as cache is shared across all processes.

Initialization

Initialize with app reference.

Parameters:

app (Pynenc) – The Pynenc application instance

property client: redis.Redis

Lazy initialization of Redis client

conf() pynenc_redis.conf.config_client_data_store.ConfigClientDataStoreRedis

Get Redis-specific configuration.

_store(key: str, value: str) None[source]

Store a value in Redis.

Parameters:
  • key (str) – The cache key

  • value (str) – The serialized value to cache

_retrieve(key: str) str[source]

Retrieve a value from Redis.

Parameters:

key (str) – The cache key

Returns:

The cached serialized value

Raises:

KeyError – If key not found in cache

_purge() None[source]

Clear all cached arguments from Redis.