What Is Cache Eviction?
Cache eviction is the process of deleting entries from a cache when it exceeds a size limit or when entries age out. Policies such as least-recently-used (LRU) or least-frequently-used decide what goes first. CI caches commonly enforce a total size cap and evict the oldest or least-used entries to stay under it.
Why it matters
Caches are bounded, so eviction is inevitable, and it directly shapes the hit ratio: aggressive eviction discards entries you would have reused. Understanding the policy and the size cap helps you avoid thrashing, where large or numerous entries evict each other and the cache stops helping.
Related concepts
- Common policies: LRU and age-based expiry
- Size caps force eviction of older or rarer entries
- Eviction thrashing collapses the hit ratio
Related guides
What Is Cache Hit Ratio?Cache hit ratio is the fraction of cache lookups served from the cache rather than recomputed or refetched, a…
What Is Cache Scope?Cache scope defines the boundary within which a cache entry is shared and reusable, such as per branch, per r…
What Is Artifact Retention?Artifact retention is the policy controlling how long CI build outputs, logs, and test results are stored bef…