Cache replacement policy
A cache replacement policy is a rule or algorithm for selecting which cached item to remove when capacity is insufficient or cached data must be discarded.
Latency
A cache replacement policy is a rule for selecting which cached element to evict when storage capacity is exhausted.
- How it is used
- Selects entries to evict from a full cache to preserve fast access within limited storage.
- How deep it goes
- Defines the eviction decision and walks through FIFO and SIEVE behavior, without specifying a complete cache implementation.
- Examples
- Uses a 10 MB working set against a 1 MB cache and a SIEVE eviction that skips visited C to evict B.
- What you can do after
- Evaluate/understand how capacity, workload, and eviction choice affect cache hit ratio and latency.
100 Go Mistakes and How to Avoid Them
A cache replacement policy selects an existing cache line to evict when a new block must be stored in a full set.
- How it is used
- Diagnoses why repeated memory accesses evict one another when a cache set reaches capacity.
- How deep it goes
- Explains set-index collisions, eviction, pseudo-LRU behavior, and resulting conflict misses, but not replacement implementation internals.
- Examples
- Uses matrix rows, repeated address patterns, and calculateSum512 and calculateSum513 benchmark functions.
- What you can do after
- Diagnose conflict misses by tracing set indices and identifying accesses that fill and replace one cache set.
Read how 100 Go Mistakes and How to Avoid Them explains cache replacement policy →
Related concepts
- cachingconfigures · Caching is the practice of storing reusable data or computation results so later access can avoid repeating retrieval or computation.
- queueincludes · A queue is an ordered collection that holds items for retrieval or processing, typically removing them in the order they were added.
- LRUincludes · LRU is a cache replacement policy that evicts the item whose most recent access occurred furthest in the past.
- memoizationconfigures · Memoization is an optimization technique that stores computation results with their inputs so equivalent later evaluations can reuse them without recomputation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

