jargon

Comparison

RevalidationvsStale-while-revalidate

Revalidation

the cached data renders instantly and a background request quietly replaces it a moment later.

Serving cached data immediately while fetching a fresh copy behind it, then swapping in the result. It is what makes a data-fetching library feel instant on a second visit, and it is triggered by window focus, reconnect or an interval as well as by navigation. The cost is that users can act on data that is a few seconds old, so anything with a correctness requirement needs an explicit freshness check before the mutation.

Full entry →

Stale-while-revalidate

you hand back the expired value immediately and refresh it in the background, so nobody actually waits for the recompute.

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.

Full entry →

Related comparisons