Latest post
Caching Layers: Where to Cache and What Can Go Wrong
A request can be cached in the browser, at a CDN, in your app's memory, in Redis, and in the database's own buffer pool. Each layer cuts latency and load, and each one adds a copy that can go stale, leak between users, or refuse to be invalidated. Here's what each layer is good for, how their staleness adds up, and how to invalidate a stack of caches in the right order.