What problem does it solve?
Provides production-oriented Redis patterns and checklist guidance to prevent cache inconsistency, data loss, and operational outages when using Redis in Java Spring Boot (MVC and WebFlux) applications. It consolidates cache-aside, eviction, serialization, distributed locking, rate limiting, pub/sub, streams, and cluster configuration best practices so teams avoid common anti-patterns like no TTL, KEY scans, and hot keys.
Core Features & Use Cases
- Cache Consistency & Performance: TTL strategies, eviction on writes, serializer recommendations, cache stampede protection, and write-behind/write-through tradeoffs for both reactive and blocking code.
- Distributed Coordination: Redisson and RedisTemplate locking patterns, atomic unlock via Lua, fair/read-write lock options, and lock TTL/lease management for order processing and critical sections.
- Rate Limiting & Atomic Scripts: Full Lua rate-limiter script example and WebFlux filter integration for per-client limits and headers.
- Messaging & Streams: Pub/Sub with SSE examples, Redis Streams producer/consumer with consumer groups and trimming, suitable for event-driven workflows and durable queues.
- Cluster & HA Guidance: Sentinel and Cluster configuration, hash tag key design for multi-key operations, connection pooling, and Testcontainers examples for integration testing.
Quick Start
Use the redis-patterns skill to implement a reactive cache-aside with a 30 minute TTL, configure serializer and eviction rules, and add a Redisson-based distributed lock for critical order updates.