What it is
Multi tier caching stacks several cache layers of increasing size and latency. A request checks the fastest, smallest layer first and falls through to slower, larger layers, finally reaching the database only if every cache misses.
A typical hierarchy
- L1 is an in process cache inside the application, the fastest but smallest and per node.
- L2 is a shared distributed cache like Redis, larger and consistent across nodes.
- The database is the source of truth, the slowest layer.
Benefits and costs
- Most reads are served from L1 at memory speed with no network hop.
- The shared L2 absorbs misses so the database stays protected.
- The hard part is consistency: an update must invalidate the key in every tier, and a per node L1 makes that harder because each node holds its own copy.
- Short L1 TTLs limit how stale a local copy can become between invalidations.
Key idea
Multi tier caching layers a fast local cache over a shared one over the database, maximizing hits while making consistency across tiers the central challenge.