Home/Skills/Redis Caching Patterns
Claude Code
SKILL.md
Database
Verified
Featured

Redis Caching Patterns

Implement Redis caching strategies — cache-aside, write-through, TTL, invalidation, and pub/sub.

Claude Code
Cursor

Quick Info

File Type:SKILL.md
Platform:Claude Code
Author:MCP Directory
Category:Database

What 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

#redis
#caching
#performance
#optimization

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:

  1. Create a .claude/ folder in your project root
  2. Create a file named SKILL.md in the .claude/ folder
  3. Copy the skill code above and paste it into the SKILL.md file
  4. Save the file and Claude Code will automatically use this skill

For Cursor:

  1. Create a file named .cursorrules in your project root
  2. Copy the skill code above and paste it into the file
  3. Save and Cursor will apply these rules automatically

Related Skills

Claude Code

Database Schema Designer

Designs normalized database schemas with proper indexing, constraints, and migration patterns.

Claude Code

Prisma ORM Expert

Prisma ORM specialist — schema design, migrations, type-safe queries, and PostgreSQL/MySQL optimization.

Cursor

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.