spakky-redis¶
Redis 캐시 백엔드 플러그인입니다.
Redis 캐시¶
Redis implementation of the spakky-cache contract.
ISyncRedisClient
¶
Bases: ABC
Explicit sync Redis boundary used by RedisCache.
IAsyncRedisClient
¶
Bases: ABC
Explicit async Redis boundary used by RedisCache.
IRawSyncRedisClient
¶
Bases: ABC
Explicit raw sync Redis boundary before response narrowing.
IRawAsyncRedisClient
¶
Bases: ABC
Explicit raw async Redis boundary before response narrowing.
RedisRawSyncClient(raw)
¶
Bases: IRawSyncRedisClient
Raw sync Redis client wrapper for redis-py.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/cache.py
RedisRawAsyncClient(raw)
¶
Bases: IRawAsyncRedisClient
Raw async Redis client wrapper for redis-py.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/cache.py
SyncRedisAdapter(raw)
¶
Bases: ISyncRedisClient
Typed boundary over the redis-py sync client.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/cache.py
AsyncRedisAdapter(raw)
¶
Bases: IAsyncRedisClient
Typed boundary over the redis-py async client.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/cache.py
RedisCache(config=None, *, client=None, async_client=None)
¶
Bases: ITaggedCache[T], IStampedeProtectedCache[T], ICacheMetrics[T], IWritePolicyCache[T]
Redis-backed cache that stores pickled values under a configured prefix.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/cache.py
Actuator 확장¶
Actuator extensions for the Redis cache backend.
RedisCacheHealthProbe(cache, config)
¶
Bases: AbstractHealthProbe
Report Redis cache backend reachability.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/actuator.py
RedisCacheMetricsInfoContributor(cache)
¶
Bases: IInfoContributor
Expose Redis cache metrics through actuator info.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/actuator.py
설정¶
Redis cache backend configuration.
RedisCacheConfig()
¶
Bases: BaseSettings
Redis cache backend configuration loaded from environment variables.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/common/config.py
host = 'localhost'
class-attribute
instance-attribute
¶
Redis server hostname.
port = 6379
class-attribute
instance-attribute
¶
Redis server port.
db = 0
class-attribute
instance-attribute
¶
Redis database index.
username = None
class-attribute
instance-attribute
¶
Optional Redis ACL username.
password = None
class-attribute
instance-attribute
¶
Optional Redis password.
use_ssl = False
class-attribute
instance-attribute
¶
Use redis+ssl transport when true.
key_prefix = 'spakky:cache:'
class-attribute
instance-attribute
¶
Prefix applied to keys managed by this cache backend.
socket_timeout = 5.0
class-attribute
instance-attribute
¶
Socket timeout in seconds for Redis operations.
scheme
property
¶
Return the Redis URL scheme for this configuration.
connection_url
property
¶
Return a Redis connection URL without embedding credentials.
플러그인 진입점¶
Plugin initialization for Redis cache integration.
initialize(app)
¶
Register Redis cache configuration and backend pods.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/main.py
redis_cache_health_probe(cache, config)
¶
Create the Redis cache actuator health probe.
Source code in plugins/spakky-redis/src/spakky/plugins/redis/main.py
redis_cache_metrics_info_contributor(cache)
¶
Create the Redis cache actuator metrics info contributor.