Backend & systems·Caching and invalidation
you hand back the expired value immediately and refresh it in the background, so nobody actually waits for the recompute.
Stale-while-revalidate
A policy that keeps serving an expired entry for a grace period while a single background request refreshes it. It converts a latency spike at expiry into slightly stale data, which for most read paths is the better trade. It also removes stampedes by construction, because only the refreshing request touches the origin.