What Is Stale-While-Revalidate?
Stale-while-revalidate is a caching pattern where a cached value is returned right away, even if slightly out of date, while an asynchronous request updates the cache in the background. The next request then sees the refreshed value. It trades a small staleness window for consistently fast responses.
Why it matters
Always revalidating before responding adds latency on every request; never revalidating risks serving stale data forever. Stale-while-revalidate keeps responses instant while still converging on fresh data.
Related guides
Cache-Control - CI/CD Glossary DefinitionCache-Control is the HTTP header that dictates how responses may be cached - max-age, no-store, private - acr…
What Is a Service Worker Cache?A service worker cache is a programmable store that a service worker uses to intercept requests and serve res…
What Is a Warm Cache?A warm cache is already populated with frequently needed data, so most requests hit it and are served quickly…