redis-patterns

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

23|7|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/kinncj/MAPLE --skill redis-patterns-kinncj
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: redis-patterns
Source: https://github.com/kinncj/MAPLE/tree/main/template/.opencode/skills/redis-patterns
Command: npx skills add https://github.com/kinncj/MAPLE --skill redis-patterns-kinncj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Redis-patterns help engineers implement common Redis data structures and patterns for efficient caching, pub/sub, and data modeling in distributed services.

Core Features & Use Cases

  • Cache-Aside Pattern: Use TTL-based caching to reduce database load and improve response times.
  • Rate Limiting with Sorted Sets: Enforce per-client request limits by tracking timestamps in a sorted set with expirations.
  • Session Store: Leverage Redis-backed sessions for scalable, TTL-managed user sessions.
  • Key Convention: Use the canonical key format {app}:{domain}:{entity}:{id} for consistent, searchable keys.

Quick Start

Integrate common Redis patterns into your service to enable caching, pub/sub messaging, and rate limiting.

Frequently Asked Questions about redis-patterns

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

FAQPage Schema
How do I implement a cache-aside pattern with Redis to reduce database load?▼

The cache-aside pattern with Redis uses TTL-based caching to reduce database load and improve response times. You check the cache first, fetch from the database on a miss, and populate the Redis key with an expiration TTL.

How does rate limiting work with Redis sorted sets?▼

Rate limiting with Redis sorted sets enforces per-client request limits by tracking request timestamps as scored members in a sorted set. You remove expired timestamps and count remaining members to block or allow requests.

What is the canonical key naming convention for Redis data modeling?▼

The canonical Redis key naming convention follows the format {app}:{domain}:{entity}:{id}. This hierarchical structure ensures consistent, searchable keys across distributed services and prevents namespace collisions.

Can I use Redis as a session store for scalable microservices?▼

Yes, you can use Redis as a session store for scalable microservices. It provides TTL-managed, in-memory user sessions that enable fast lookups and automatic expiration across distributed service instances.

When should I use Redis pub/sub for messaging in my applications?▼

Use Redis pub/sub for messaging when building real-time applications or microservices requiring fast, in-memory event broadcasting. It allows services to publish messages to channels and subscribers to receive events instantly.

What Redis data structures are best for high-performance data access layers?▼

Strings, hashes, and sorted sets are the best Redis data structures for high-performance data access layers. They enable efficient caching, rate limiting, and scalable session management when combined with TTL-based expirations.