Long-Term Caching - CI/CD用語集の定義
long-term caching はハッシュ付きassetを非常に遠い有効期限で配信し、再訪ユーザーがダウンロードを完全にスキップできるようにします。
long-term caching は静的assetを非常に遠い将来のキャッシュ有効期間で配信し、ブラウザが訪問をまたいで再利用できるようにすることです。ファイル名にコンテンツ変更のたびに変わる content hash が含まれている場合にのみ安全です。
content hash 付きのファイル名と長い max-age(多くの場合 immutable としてマーク)を組み合わせることで、ブラウザはassetを1年間キャッシュしつつ、コンテンツが変わったときには更新を取得できます。CIでは、プロダクション build がこの戦略の前提となるハッシュ付きファイル名を生成します。
関連ガイド
Content Hash - CI/CD Glossary DefinitionContent Hash: A content hash is a hash computed from a file contents, used in output filenames so the name ch…
Cache Busting - CI/CD Glossary DefinitionCache Busting: Cache busting forces clients to download a new version of a file by changing its URL, usually…
Asset Hashing - CI/CD Glossary DefinitionAsset Hashing: Asset hashing embeds a content-derived hash in output filenames (for example `app.3f9a1c.js`)…