redis-patterns
Redis Patterns teaches you to leverage Redis for caching, real-time messaging, rate limiting, and distributed coordination. Learn data structure selection, cache invalidation strategies, stampede prevention, and session storage through working code examples and anti-patterns to avoid.
Redis Patterns shows you how to implement caching, pub/sub messaging, rate limiting, and distributed locks effectively.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-22
Redis Patterns shows you how to implement caching, pub/sub messaging, rate limiting, and distributed locks effectively. Redis Patterns teaches you to leverage Redis for caching, real-time messaging, rate limiting, and distributed coordination. Learn data structure selection, cache invalidation strategies, stampede prevention, and session storage through working code examples and anti-patterns to avoid.
Use it when
- Redis Patterns guides you through selecting the right data structures—strings, hashes, lists, sets.
- Redis Patterns teaches rate limiting via sliding window counters and token bucket algorithms.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Similar skills
Install
organvm/a-i--skills/redis-patterns · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I implement redis caching in my application?
Redis Patterns covers multiple caching strategies including cache-aside, write-through, and write-behind patterns. The skill teaches you to store frequently accessed data in Redis, validate cache hits before database queries, and implement expiration strategies to keep your cache fresh. You'll learn how to prevent cache stampedes when popular keys expire and design TTL policies for different data types.
What are the best redis data structures for scalability?
Redis Patterns guides you through selecting the right data structures—strings, hashes, lists, sets, and sorted sets—based on your access patterns and scalability needs. The skill covers key naming conventions that support sharding, efficient memory usage through structure choice, and how different structures impact query performance. You'll learn to optimize for both read/write throughput and memory footprint.
How can I build rate limiting and distributed locking with Redis?
Redis Patterns teaches rate limiting via sliding window counters and token bucket algorithms, plus distributed lock implementation using SET with NX and expiration. You'll learn Lua scripting for atomic operations, preventing race conditions in multi-process environments, and handling lock timeouts gracefully. The skill covers both simple and advanced locking patterns for coordinating access across distributed systems.
How to use redis for pub/sub messaging and events?
Redis Patterns covers pub/sub channels for real-time message broadcasting and Redis Streams for durable, consumer-group-based event processing. You'll learn when to choose each approach, how to build event-driven architectures, and implement message ordering and replay. The skill includes patterns for handling subscriber failures and ensuring reliable message delivery in production systems.
What redis patterns should I avoid in production?
Redis Patterns teaches anti-patterns including unbounded key growth, ignoring memory eviction policies, blocking operations on large datasets, and poor Lua script design. You'll learn why synchronous blocking calls hurt performance, how inadequate expiration strategies lead to memory bloat, and common mistakes in cluster configuration. The skill emphasizes best practices to prevent these pitfalls.
How do I manage sessions and message queues with Redis?
Redis Patterns covers session storage using hashes with appropriate TTLs, session invalidation strategies, and scaling session stores across instances. For message queues, you'll learn list-based queues for simple cases and Redis Streams for complex workflows requiring consumer groups, acknowledgments, and message history. The skill teaches durability considerations and recovery patterns.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Redis Patterns
Effective patterns for caching, messaging, and distributed coordination with Redis.
Data Structure Selection
| Need | Structure | Example |
|---|---|---|
| Simple cache | String | SET user:123 '{"name":"Jo"}' |
| Object fields | Hash | HSET user:123 name Jo email jo@x.com |
| Unique collection | Set | SADD online_users user:123 user:456 |
| Ranked items | Sorted Set | ZADD leaderboard 100 user:123 |
| Message queue | List | `LPUSH |
(truncated - see the full file via the links below)
File tree — 1 file
skills/development/redis-patterns/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Learn Redis caching patterns and strategies for application performance”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill teaches Redis data structures—strings, lists, hashes, sets, and sorted sets—along with key management, transactions, and pub/sub messaging. Learn to configure Redis as a data store, execute atomic operations, and build caching solutions for agent workflows.
Flash Sale Scaling equips you with infrastructure patterns to survive extreme traffic events—50–100× normal load arriving in seconds. The skill covers platform-specific strategies for Shopify, WooCommerce, and BigCommerce, plus custom implementations using Redis atomic inventory, queue-based order intake, and graceful degradation under load.
This skill equips Claude Code with the ability to initialize, structure, and maintain monorepo architectures using modern workspace tools and automation. It handles dependency management, task orchestration, and cross-package coordination to streamline development workflows across multiple interconnected projects.
Frontend Patterns provides standardized approaches for constructing UI components, pages, authentication flows, and analytics integration across modern web frameworks. It covers server and client component distinctions, protected route implementation, form handling with validation, and accessibility requirements to maintain consistency throughout your project.
Master building production FastAPI applications through dependency injection, custom middleware, and async patterns. This skill covers project structure, Pydantic validation, router organization, background task handling, and testing strategies for robust APIs.
This skill walks you through deploying and operating Redis across single-instance, Sentinel, and cluster modes. Learn core commands for strings, hashes, lists, and sorted sets; configure persistence with RDB snapshots and AOF; implement caching, rate limiting, pub/sub, and distributed locking patterns; and run Redis in Docker with monitoring.
More skills docker-containerization (Apache-2.0)