In memory
A lightweight, bounded cache for a single Node.js process.
Get startedIntroducing LazyLayers 9.0. Multi-layer caching, intelligent batching and outage recovery.
Explore what’s newLazyLayers How it worksUpdated
Call getOrSet with a key and a loader. LazyLayers handles the rest: memory first, then the shared cache, then your loader, and the value fills every layer on the way back.
Pick a layer to trace a read
Distributed caching
As your application grows, every instance gets its own local cache. LazyLayers connects those instances through shared storage and an event bus.
01
A Redis lease lets one server load a missing key while the others wait, then wakes them with the value. Your database sees one query, not one per server.
Learn more02
Invalidate a key, a pattern or a tag, and an event bus tells every other instance to drop its local copy.
Learn more03
Stale values, bounded retries and circuit breakers soften slow or unavailable dependencies. If nothing usable is cached, a request can still fail.
Learn moreDeployment
Start with the infrastructure you already have.
A lightweight, bounded cache for a single Node.js process.
Get startedShared caching, coordinated refreshes and invalidation across application instances.
Explore Redis setupCache at the edge with Workers KV, or use Durable Objects for shared coordination.
Explore Cloudflare setupCoordinate locks, counters, rate limits and invalidation through the MongoDB you already run.
Explore MongoDB coordinationWorks with
No. LazyLayers works as a standalone in-memory cache. Redis is optional, for applications that need a shared cache and refreshes coordinated across servers.
LazyLayers is framework-independent. Use it with Hono, Express, Fastify or any other Node.js application, and in Cloudflare Workers.
With fail-safe enabled, LazyLayers returns the last good value it kept for that key, 30 seconds past expiry by default. Requests can still fail when no usable value exists.
Yes. LazyLayers has a Worker-safe entry point with Cloudflare KV support. KV is eventually consistent and has no Redis-style loader lease across isolates, so different isolates can each load the same missing key.