redis-patterns

Provide Redis patterns for cache, session, rate-limit, lock, Pub/Sub, and Streams decisions.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/voidrot/agents --skill redis-patterns-voidrot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis-patterns
Source: https://github.com/voidrot/agents/tree/main/skills/database/redis-patterns
Command: npx skills add https://github.com/voidrot/agents --skill redis-patterns-voidrot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill unit offers a comprehensive guide to optimize Redis cache, session, rate-limit, lock, Pub/Sub, Streams, TTL, eviction, and key-design decisions.

Core Features & Use Cases

  • Expert Redis Patterns: Detailed patterns for Redis cache, session, rate-limit, lock, Pub/Sub, Streams, TTL, eviction, and key-design decisions.
  • Decision Workflow: A step-by-step workflow to classify the state, pick the data structure, define lifecycle, ensure atomicity, and verify operational fit.
  • Safety Rules: Guidance on safe Redis usage, including avoiding KEYS * and considering TTLs and locks.

Quick Start

Use the redis-patterns skill to review your caching strategy and key design for the Redis application.

Frequently Asked Questions about redis-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Redis cache and key design for distributed systems?

Optimize Redis cache and key design by classifying state, picking the right data structure, defining lifecycle with TTLs, and ensuring atomicity. This approach prevents memory bloat and improves performance in distributed systems.

What are the best practices for Redis rate limiting and session management?

Best practices for Redis rate limiting and session management involve using atomic operations, structured key design, and TTL eviction policies. These patterns ensure consistent distributed state while preventing memory leaks.

How do I avoid blocking Redis with unsafe commands like KEYS *?

Avoid blocking Redis by strictly prohibiting unsafe commands like KEYS *. Instead, use structured key design and scan-based iteration to ensure operational safety and maintain system throughput.

When should I use Redis Pub/Sub vs Streams for my application?

Choose Redis Pub/Sub for ephemeral fire-and-forget messaging, and Redis Streams for durable, consumer-group message processing. Selecting the correct pattern ensures reliable event delivery in distributed systems.

How do I handle Redis failure modes and connection pooling effectively?

Handle Redis failure modes and connection pooling by implementing robust retry logic, circuit breakers, and pool size limits. This ensures distributed system resilience and prevents cascading failures during network issues.