redis-patterns

Redis patterns including caching strategies, pub/sub, streams for event processing, Lua scripts, and data structures

Content Preview
---
name: redis-patterns
description: Redis patterns including caching strategies, pub/sub, streams for event processing, Lua scripts, and data structures
---

# Redis Patterns

## Caching Strategies

```typescript
async function getUser(userId: string): Promise<User> {
  const cacheKey = `user:${userId}`;
  const cached = await redis.get(cacheKey);

  if (cached) {
    return JSON.parse(cached);
  }

  const user = await db.user.findUnique({ where: { id: userId } });
  if (user) {
    await red
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/redis-patterns.md \
  https://raw.githubusercontent.com/rohitg00/awesome-claude-code-toolkit/main/skills/redis-patterns/SKILL.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/rohitg00/awesome-claude-code-toolkit

Then reference at skills/redis-patterns/SKILL.md

Related Skills