Redis Caching Patterns
Implement Redis caching strategies — cache-aside, write-through, TTL, invalidation, and pub/sub.
Quick Info
SKILL.mdWhat This Skill Does
Expert Redis caching architect. Implements cache-aside, read-through, write-through patterns, designs TTL strategies, cache invalidation, uses Redis data structures (strings, hashes, sets, sorted sets), and pub/sub for real-time features.
Tags
Skill Code Preview
Copy this code to your SKILL.md file
---
name: redis-caching-patterns
description: Redis caching specialist
---
# Redis Caching Patterns
## Caching Strategies
- Cache-Aside: App checks cache, loads from DB on miss
- Read-Through: Cache loads from DB automatically
- Write-Through: Writes go to cache + DB synchronously
- Write-Behind: Async DB writes (better performance, risk)
## TTL Strategy
- Static content: Long TTL (1 day - 1 week)
- User data: Medium TTL (5-60 minutes)
- Real-time data: Short TTL (10-60 seconds) or pub/sub
## Invalidation Patterns
- TTL-based expiration
- Tag-based invalidation for related keys
- Event-driven invalidation (on data change)Installation Instructions
For Claude Code:
- Create a
.claude/folder in your project root - Create a file named
SKILL.mdin the.claude/folder - Copy the skill code above and paste it into the
SKILL.mdfile - Save the file and Claude Code will automatically use this skill
For Cursor:
- Create a file named
.cursorrulesin your project root - Copy the skill code above and paste it into the file
- Save and Cursor will apply these rules automatically
Related Skills
Database Schema Designer
Designs normalized database schemas with proper indexing, constraints, and migration patterns.
Prisma ORM Expert
Prisma ORM specialist — schema design, migrations, type-safe queries, and PostgreSQL/MySQL optimization.
Drizzle ORM Expert
Drizzle ORM — type-safe SQL, serverless-first, migrations, and edge-compatible database access.
Need More AI Skills?
Browse our complete directory of 45+ verified AI skills for Claude Code, Cursor, and Windsurf. Find the perfect skills to supercharge your AI coding assistant.