Introducing LazyLayers 9.0. Multi-layer caching, intelligent batching and outage recovery.

Explore what’s new

LazyLayers CompareUpdated

How LazyLayers compares.

The same six libraries as the benchmarks, feature by feature, read from each README at the version benchmarked. Pick the one that fits, even when it is not us.

Feature comparison

FeatureLazy Layers8.0.0bentocache1.6.1cache-manager7.2.9cacheable2.5.0cachified5.6.3async-cache-dedupe3.4.0layered-loader17.0.0
Memory L1 in front of a shared L2one storeone store
One load per key per process
One load per key across servers······
Waiting servers woken when the load ends······
Peer L1 caches kept in sync over a bus···
Peers warmed with the loaded value·····
Stale value when the origin fails·····
Stale-while-revalidate··
Invalidate by tag··partialgroups
Invalidate by pattern······
L1 limited by bytes and process memory······
Cloudflare Workers···KV adapter··
Prometheus metrics·····
Rows fully covered13/137/132/135/132/132/134/13

Read from each library’s README at the version benchmarked, on 2026-11-12. A dash means the README does not mention it, which is not proof the library lacks it. Full table with sources

Honest picks

When to pick something else

You need a bounded Map and nothing else

Pick lru-cache, quick-lru

They insert 2 to 3× faster and hold less per entry, because they skip TTLs, byte budgets and eviction bookkeeping.

You need a storage driver we do not ship

Pick bentocache

It ships SQL, DynamoDB, file and Upstash drivers. Lazy Layers ships Redis, Cloudflare KV, Durable Objects and MongoDB, plus a conformance kit for your own.

One process, and the lowest cost per miss

Pick layered-loader, async-cache-dedupe

A miss costs them a few hundred nanoseconds less. Lazy Layers spends that on bookkeeping that pays off once you run several servers.

FAQ

Questions about choosing a cache

Read all FAQs

Is LazyLayers faster than bentocache?

On a warm hit and under a herd, yes, in the in-process read-through benchmark in BENCHMARKS.md: 180 ns per hit in reference mode (1,504 ns encoded) against 1,120 ns for bentocache with serialize: false (2,429 ns by default), and 30.2 ms against 89.8 ms for 10,000 callers on one cold key. On skewed traffic with misses, bentocache with serialize: false was slightly faster per call, 1,936 against 2,011 ns, while LazyLayers hit more keys.

Should I use lru-cache or LazyLayers?

Use lru-cache, quick-lru or @isaacs/ttlcache when you need a bounded in-memory map and nothing more. They insert faster and hold less per entry. Use LazyLayers when you need read-through loading, stampede protection, a shared L2 or invalidation across instances.

Which read-through cache has the lowest overhead on one process?

layered-loader and async-cache-dedupe: 435 and 911 ns per call on skewed traffic in BENCHMARKS.md, against 2,011 ns for LazyLayers in reference mode, which spends more on bookkeeping that pays off with several processes.

What does LazyLayers describe that bentocache’s README does not?

One load per key across processes with a Redis lease, waking waiting servers when that load finishes, warming peers’ L1 with the loaded value, pattern invalidation, batch loads, an L1 limited by bytes that shrinks under memory pressure, a choice of eviction policy, and Cloudflare Workers support. A missing entry in a README is not proof a library lacks the feature. bentocache’s README describes more storage drivers: SQL, DynamoDB, file, Upstash and Vercel KV.