two-tier cache

A cache with a small, very fast local layer inside each server process (L1) in front of a larger shared layer such as Redis (L2).

In more detail

A read checks L1 first, then L2, then the database, and copies whatever it finds back into the faster tiers. The hard part is invalidation: when data changes, every server’s L1 must be told, usually with a pub/sub message.

Related terms

Taught in

References