Skip to main content

Module multilayer

Module multilayer 

Source
Expand description

Multi-layer (L1/L2) caching behind a single Cache face.

MultiLayerCache layers a fast in-process L1 over a slower but larger L2 (e.g. Redis). Reads are L1-first with an L2 fallback; a hit on L2 is backfilled into L1. Writes and invalidations go to both layers.

Structsยง

MultiLayerCache
A read-through, write-through composition of an L1 and L2 cache.