Nestjs Caching
ASecurityPrevent a stampede by combining three controls: add random TTL jitter so keys do not expire together, use a distributed lock so only one worker recomputes a value, and let other requests receive stale data or wait briefly while the refresh completes. For high-traffic reads, use L1 memory plus Redis L2 and a stale-while-revalidate flow. The lock must have an expiry and the recomputation must be idempotent; release it only if the caller owns it. Do not solve grouped invalidation with Redis `KEY...
- 584 stars
- 0 votes
- 0 copies
- 2 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill nestjs-caching --agent claude-codeAre you the author of Nestjs Caching?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-nestjs-caching-bbacf744)Prevent a stampede by combining three controls: add random TTL jitter so keys do not expire together, use a distributed lock so only one worker recomputes a value, and let other requests receive stale data or wait briefly while the refresh completes.
For high-traffic reads, use L1 memory plus Redis L2 and a stale-while-revalidate flow. The lock must have an expiry and the recomputation must be idempotent; release it only if the caller owns it. Do not solve grouped invalidation with Redis `KEYS`, and do not use process-local memory as the shared cache in a multi-pod deployment.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.