Redis Best Practices
SkillDatabases & dataOptimize Redis as cache and coordination infrastructure with TTL, eviction, and latency-aware key design. Use when implementing Redis caching, key invalidation, or Redis performance work.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Redis Best Practices skill
What this skill tells your AI
The instructions your AI receives, as published by hoangnguyen0403/agent-skills-standard in skills/database/database-redis/SKILL.md and read by ahel’s review.
Priority: P0 (CRITICAL)
Redis is fast only when key shape, TTL ownership, and command complexity are explicit.
Rules
- Namespace keys by product/domain and entity.
- Give cache keys a TTL or a documented reason not to expire.
- Pick eviction policy to match workload:
allkeys-lrufor general caches,volatile-lrufor mixed persistent/ephemeral data. Monitor hit rate and evictions. - Avoid slow or unbounded commands in hot paths; prefer
SCANoverKEYSandUNLINKoverDELfor large-key deletion.lazyfreesettings help background reclamation.
Verify
- Key naming identifies owner and invalidation scope.
- TTL or eviction policy exists for non-durable data.
- Large reads use bounded range/scan patterns.
- Connection timeouts and pool settings are explicit.
- Critical state does not exist only in Redis.
Anti-Patterns
- No sole truth in Redis: Always persist critical data to durable primary database.
- No large blobs: Split values > 100KB into smaller keys or use Hashes for field access.
- No JSON for objects: Use
HSETfor object fields to enable O(1) access without full decode. - No TTL-less keys: Set TTL or eviction policy on all non-permanent keys to prevent unbounded growth.
- No
KEYSin app paths: useSCANor explicit index keys.
References
Canonical response anchors
When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:
- lazyfree
Signals
- GitHub stars
- 565
- Forks
- 164
- Last commit
- Sep 2026
ahel review
S4info
community integration — published by hoangnguyen0403, not redis
Automated review, not a security audit. Ruleset v1.
Advanced
- Catalog kind
- skill
- Gateway key
database-redis- Source
- github.com/hoangnguyen0403/agent-skills-standard