Stale-While-Revalidateとは何か?
Stale-while-revalidateは、多少古くてもcacheされた値をすぐに返し、その間に非同期のリクエストがバックグラウンドでcacheを更新するcachingパターンです。次のリクエストは、その後リフレッシュされた値を見ます。わずかな古さのウィンドウと引き換えに、一貫して高速なレスポンスを得ます。
なぜ重要か
応答前に常に再検証すると、すべてのリクエストにlatencyが加わります。決して再検証しなければ、古いデータを永遠に提供する危険があります。Stale-while-revalidateは、レスポンスを瞬時に保ちながら、新しいデータへの収束も続けます。
関連ガイド
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…