redis-patterns

Implement Redis caching, rate limiting, and pub/sub patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ThePhoenixAgency/Phoenix-Agents-Marketplace --skill redis-patterns-thephoenixagency
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: redis-patterns
Source: https://github.com/ThePhoenixAgency/Phoenix-Agents-Marketplace/tree/main/skills/redis-patterns
Command: npx skills add https://github.com/ThePhoenixAgency/Phoenix-Agents-Marketplace --skill redis-patterns-thephoenixagency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides practical, ready-to-use patterns for leveraging Redis in common application scenarios, optimizing performance and reliability.

Core Features & Use Cases

  • Caching: Implement efficient in-memory caching to reduce database load and improve response times.
  • Rate Limiting: Protect your services from abuse with robust sliding window rate limiting.
  • Pub/Sub: Enable real-time communication between different parts of your application or microservices.
  • Streams: Utilize Redis Streams for robust event sourcing and message queuing.

Quick Start

Use the redis-patterns skill to cache a database query result for 5 minutes.

Frequently Asked Questions about redis-patterns

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

FAQPage Schema
How do I implement sliding window rate limiting in Redis?▼

Sliding window rate limiting in Redis is implemented using sorted sets and the ZADD command to track request timestamps, protecting distributed services from abuse by accurately counting actions within a moving time frame.

What is the best way to cache database query results with Redis?▼

Caching database query results with Redis uses the SETEX command to store data with a Time-To-Live, reducing database load and improving application response times through efficient in-memory retrieval.

How do I use Redis Streams for message queuing and event sourcing?▼

Redis Streams enables robust message queuing and event sourcing by appending structured log entries for distributed systems, ensuring reliable real-time communication and persistent event consumption.

Does this Redis pub/sub pattern work for real-time microservices communication?▼

Redis pub/sub facilitates real-time communication between microservices by using the PUBLISH command to broadcast messages, enabling different parts of a distributed application to react to events instantly.

Do I need a running Redis instance to use these caching and messaging patterns?▼

Yes, executing these caching, rate limiting, and messaging patterns requires a running Redis instance and a client library to process commands like GET, SETEX, ZADD, and PUBLISH.

When should I use Redis Streams instead of Redis pub/sub for messaging?▼

Use Redis Streams for robust message queuing and event sourcing where message persistence is required, whereas pub/sub is suited for ephemeral real-time communication without message storage.