Leniu Redis Cache & Distributed Lock

•
11
•

Streamlines Redis caching and distributed locking operations using the RedisUtil toolkit for Java applications.

The leniu-redis-cache skill provides a standardized framework for Redis integration within the leniu-tengyun-core project, offering specialized guidance for String, Object, and ZSet operations. It focuses on implementing robust distributed locking mechanisms using Redisson to ensure thread safety across distributed systems, while providing pre-defined patterns for common scenarios like cache breakthrough protection, API rate limiting, and task de-duplication. By enforcing consistent naming conventions and lifecycle management, it helps developers build scalable and reliable high-concurrency backend services.

Key Features

01Atomic counter support for increment/decrement operations
02Unified RedisUtil wrapper for String, Object, and ZSet operations
03Built-in patterns for cache breakthrough and rate limiting
04Redisson-based distributed locking with safe-release patterns
05Standardized cache key naming conventions for maintainability
0611 GitHub stars

Use Cases

01Protecting database resources with double-check locking patterns
02Implementing distributed locks to prevent duplicate order processing
03Creating high-performance real-time leaderboards using ZSet