affaan-m avatar

Redis Patterns

A solid reference for the Redis patterns you actually need in production: cache-aside vs write-through, distributed locks with proper token-based release, sliding window rate limiting with Lua scripts, and when to pick Streams over Pub/Sub. The data structure cheat sheet alone will save you from reinventing session storage as a JSON blob in a string. Covers the essentials like connection pooling, TTL strategies, and key naming conventions that prevent your cache from turning into a memory leak. Light on theory, heavy on copy-paste-adapt code. If you're adding Redis to an app and don't want to relearn the difference between INCR and ZADD every six months, this gets you there quickly.

skills.sh installs
5.7K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill redis-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Redis Patterns

Quick reference for Redis best practices across common backend use cases.

How It Works

Redis is an in-memory data structure store that supports strings, hashes, lists, sets, sorted sets, streams, and more. Individual Redis commands are atomic on a single instance; multi-step workflows require Lua scripts, MULTI/EXEC transactions, or explicit synchronization to stay atomic. Data is optionally persisted via RDB snapshots or AOF logs. Clients communicate over TCP using the RESP protocol; connection pools are essential to avoid per-request handshake overhead.

When to Activate

  • Adding caching to an application
  • Implementing rate limiting or throttling
  • Building distributed locks or coordination
  • Setting up session or token storage
  • Using Pub/Sub or Redis Streams for messaging
  • Configuring Redis in production (pooling, eviction, clustering)

Data Structure Cheat Sheet

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, Databases
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1github avatarwinmd-api-searchgithub/awesome-copilotFind and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI/ML, sens5.7Kskills.sh installs
2affaan-m avatarx-apiaffaan-m/everything-claude-codex api4.5Kskills.sh installs
3softaworks avatardatabase-schema-designersoftaworks/agent-toolkitDesign robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint des4.4Kskills.sh installs
4redis avatarredis-coreredis/agent-skillsCore Redis modeling guidance — choose the right data structure (String, Hash, List, Set, Sorted Set, JSON, Stream, Vector Set) and use consistent colon-separate4.4Kskills.sh installs
5jeffallan avatargraphql-architectjeffallan/claude-skillsUse when designing GraphQL schemas, implementing Apollo Federation, or building real-time subscriptions. Invoke for schema design, resolvers with DataLoader, qu4.3Kskills.sh installs
6giuseppe-trisciuoglio avatarspring-ai-mcp-server-patternsgiuseppe-trisciuoglio/developer-kitProvides Spring Boot MCP server patterns that create Model Context Protocol servers with Spring AI by defining tool handlers, exposing resources, configuring pr3.9Kskills.sh installs