redis

Provide Redis-based caching and distributed locking for distributed services.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mthang1801/go-domain-driven-design --skill redis-mthang1801
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: redis
Source: https://github.com/mthang1801/go-domain-driven-design/tree/main/.claude/skills/redis
Command: npx skills add https://github.com/mthang1801/go-domain-driven-design --skill redis-mthang1801

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Redis-backed caching and distributed locking coordinate work and reduce duplicate computations across distributed services.

Core Features & Use Cases

  • Caching for master data with write-through invalidation when writes occur.
  • Distributed locking for cron jobs and single-writer tasks in multi-pod environments.
  • Lightweight, short-term data storage via RedisClientProxy for idempotency and session data.

Quick Start

Enable Redis-based caching and locking by annotating methods with @RedisCache and @RedisLock and follow the examples to invalidate caches and coordinate tasks.

Frequently Asked Questions about redis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement distributed locking for cron jobs in multi-pod deployments?▼

Distributed locking coordinates single-writer tasks across multi-pod deployments using the @RedisLock decorator. This prevents duplicate cron job execution by ensuring only one pod acquires the lock and performs the work at a time.

What is the best way to invalidate cached master data after a write operation?▼

Cache invalidation for master data is handled through write-through invalidation patterns. When writes occur, related cached entries are automatically invalidated using the @RedisCache decorator to maintain data consistency across services.

How does Redis handle idempotency and short-term session data storage?▼

Idempotency and short-term session data are managed via the RedisClientProxy for lightweight storage. This approach provides TTL control to automatically expire transient data without manual cleanup overhead.

Can I use a direct Redis client when method decorators are not suitable for my use case?▼

Direct Redis client usage is supported when decorators are not suitable for your specific requirements. This allows manual control over caching, locking, and short-lived data operations where custom logic is needed.

Why do I need distributed locking for microservices instead of local locks?▼

Distributed locking coordinates work across distributed services where local locks fail. In multi-pod environments, local locks only protect single instances, while Redis-based distributed locks ensure single-writer execution across the entire cluster.