A cache miss occurs when a lookup cannot find the requested value at the current cache level. The request must then reach a slower source. For an application cache, that source is usually a backing store; for a CPU cache, it may be another cache level or DRAM. A hit avoids that slower access. section 2.3.2 section 6.2
Misses matter because access times differ sharply. L1 cache access can take 1–2 nanoseconds, last-level cache access 10 nanoseconds or more, and DRAM access up to 100 nanoseconds. When a working set does not fit in L1, misses introduce latency variance that can affect tail latency. Instruction misses can also stall execution while the CPU waits for the fetch. section 2.3.2
For an application cache, inspect both the miss path and how often it runs:
- Measure the hit-to-miss ratio. A high miss ratio means more slow lookups or computations; cache lookup overhead can even make the application slower than it would be without caching. section 6.2
- Decide who handles a miss. With read-through caching, the cache fetches the key from the backing store, updates itself, and returns the value; the miss is transparent to the application. section 6.3.2
- Account for capacity. Once a cache is full, adding data on a miss requires eviction. A replacement policy chooses what to remove, and its effect on hit ratio depends on the workload. section 6.6
Caching an absent result
A customer-search API may repeatedly receive filters that match no records. Without a cached answer, each lookup repeats the expensive search. Negative caching stores the fact that no result exists, so a later request can avoid that work. section 6.2
Figure 6.2 With read-through caching, the client looks up a key from the cache. Unlike with cache-aside caching, the read-through cache queries the database and updates itself on a cache miss.
Follow a read-through miss from the client's key lookup through the cache's database read and cache update. section 6.3.2
Read-through caching simplifies application-side cache management, but moves backing-store access and data-format conversion into the cache. Its miss path still has tail-latency implications; refresh-ahead can update values asynchronously before they expire. section 6.3.2

