redis-caching-patterns - Implement resilient, multi-tenant Redis caching
Standardizes multi-tenant Redis caching with configurable TTLs, in-memory fallback, safe invalidation, health checks, and stampede protection.
Tags
Updated: 2026-11-08Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Isolate tenant cache keys
- Configure namespace-specific TTLs
- Fallback to in-memory caching
- Invalidate namespaces with SCAN
- Delete keys using pipelines
- Schedule background invalidation
- Distinguish misses from None
- Check Redis health
- Protect hot keys from stampedes
Inputs
- Redis connection settings
- Tenant identifiers
- Cache namespaces
- Cache keys and values
- TTL configuration
- Invalidation targets
Outputs
- Namespaced cache entries
- Expired cache entries
- Invalidated key counts
- In-memory fallback state
- Redis health status
- Cache error logs
Requirements
- Python async runtime
- redis.asyncio support
- Pydantic settings support
- Redis access for primary caching
