redis-expert

Community

Implement Redis caching and distributed locks with Lettuce & Redisson.

Authorryu-qqq
Version1.0.0
Installs0

System Documentation

What problem does it solves?

This Skill standardizes Redis integration for caching and distributed locking, leveraging a dual strategy with Lettuce for high-throughput caching and Redisson for robust distributed locks. It prevents common concurrency issues, optimizes data access, and ensures high performance and data consistency.

Core Features & Use Cases

  • Dual Redis Strategy: Implements Lettuce for efficient caching (Cache-Aside pattern, mandatory TTL) and Redisson for advanced distributed locking (Pub/Sub, Watchdog, Fair Lock).
  • Cache-Aside Pattern: Guides the implementation of caching logic where the application checks the cache first, then the database, and updates the cache, optimizing data retrieval.
  • Safe Key Management: Enforces a strict key naming convention ({namespace}:{entity}:{id}) and prohibits the KEYS command, recommending SCAN for safe pattern-based key operations.
  • Robust Distributed Locks: Utilizes Redisson's Pub/Sub mechanism for non-spin-lock behavior and Watchdog for automatic lock extension, ensuring reliable concurrency control in distributed environments.
  • Zero-Tolerance Rules: Prohibits @Transactional within adapters, business logic, and TTL-less cache entries, ensuring clean architecture and preventing common pitfalls.
  • Use Case: When a new feature requires caching frequently accessed data or implementing a distributed lock for critical sections (e.g., inventory updates), use this skill to generate the Redis adapters and configuration. This ensures high performance and data consistency, allowing you to rest easy about your data.

Quick Start

Implement a Redis cache for 'Product' data using Lettuce and a distributed lock for 'Inventory' updates using Redisson.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: redis-expert
Download link: https://github.com/ryu-qqq/AuthHub/archive/main.zip#redis-expert

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.