Production-ready and battle-tested caching for Node.js: researched from published engineering work, and benchmarked under load and faults.
6,862npm downloads
500→8script calls
0 errors4 s Redis freeze
1,200→20callers, loads
169 msworst stall, was 461
15/15faults passed
100→1servers, one load
191 msleader failover
1M→1callers, one query
47k/sone process
−90%database queries
287 MBpeak memory
71 msbus resync
6,862npm downloads
500→8script calls
0 errors4 s Redis freeze
1,200→20callers, loads
169 msworst stall, was 461
15/15faults passed
100→1servers, one load
191 msleader failover
1M→1callers, one query
47k/sone process
−90%database queries
287 MBpeak memory
71 msbus resync
Built on published work. Each name opens the paper, post or code a pattern in getOrSet comes from. Marks belong to their owners and do not imply endorsement.
getOrSetMany reads Redis in one Lua script per 64 keys, then calls your loader once for every miss. Writes and deletes in the same tick batch too. On by default.
getOrSet reads the nearest layer first: memory, a compressed warm tier, Redis, KV or your own store. Hits further down are copied closer. Each layer has its own size, eviction, deadline and breaker.
Redis or the bus down? Reads fail open to memory and your loader. Loader down too? You get the last good value. When Redis is back, missed writes are repaired and missed invalidations replayed.
Memory gets a byte budget. Near the heap or container limit, the cache gives memory back on its own: stale copies first, then what your policy values least. S3-FIFO, LFU, SIEVE, LRU or FIFO.
A hit never borrows a connection from your Postgres, MySQL, SQLite or MongoDB pool. On a miss, only a few loads run at once, shared fairly across tenants. The rest wait briefly in your app.
Tag what you load. Invalidate a key, pattern or tag once and every server drops its copy, over Redis Streams, Pub/Sub, NATS, RabbitMQ, Durable Objects or MongoDB.
Read from each library’s README on 2026-11-12; rows new in 9.0 checked against current READMEs on 2026-12-05. A dash means the README does not mention it, which is not proof the library lacks it. Full table with sources