petty-cache

JSON →
library 3.7.0 ·javascript
verified Jun 7, 2026

Two-level cache for Node.js (in-memory + Redis) with automatic serialization, jitter, double-checked locking to prevent cache stampedes and thundering herds. Version 3.7.0 released under MIT license with monthly releases. Key differentiators: built-in distributed mutex and semaphore primitives, jittered TTLs (default 30-60s Redis, 2-5s in-memory), and double-checked locking on cache miss functions. ESM-only since v3.0.0.