キャッシュヒット率とは?
キャッシュヒット率は、cache の参照のうち利用可能なエントリを見つけたもの(ヒット)と見つからなかったもの(ミス)の割合で、通常はパーセンテージで表されます。高い率はほとんどの作業が再利用されていることを意味し、低い率は cache がほとんど役立っていないことを意味します。build や依存関係の cache が効果を上げているかを判断する主要な指標です。
なぜ重要か
cache はヒットしたときにのみ処理を高速化します。不適切な key 戦略、頻繁な無効化、または eviction は、cache が構成されているにもかかわらず build を遅くするほど、ヒット率を静かに下げることがあります。CI でこの率を追跡すると、cache key や scope を調整すべきかがわかり、消費される runner の分数に直接影響します。
関連する概念
- ヒットは cache から提供され、ミスは再計算される
- 不適切な cache key と eviction は率を下げる
- build 時間と runner のコストに直接影響する
関連ガイド
What Is a Cache Key?A cache key is the identifier that determines which cached entry a lookup retrieves, typically derived from t…
What Is Cache Eviction?Cache eviction is the removal of entries from a cache to make room or enforce limits, using policies like lea…
What Is Cache Scope?Cache scope defines the boundary within which a cache entry is shared and reusable, such as per branch, per r…