cache aside pattern
Application reads from the cache first; on miss, reads the database, then populates the cache. The app owns the cache logic — simplest and most common pattern.
Application reads from the cache first; on miss, reads the database, then populates the cache. The app owns the cache logic — simplest and most common pattern.
symptoms
- thundering-herd on popular keys after expiry
- stale reads when invalidation is forgotten
causes
- TTL-only eviction without refresh
- missed cache invalidation on writes
fixes
- explicit invalidation on write
- stale-while-revalidate
- single-flight on miss
- consider read-through if cache lib supports it
you might say
- cache-aside / lookaside
- miss → DB → populate