Cache miss definition
A cache miss happens when the data that a system or application requests to retrieve cannot be found in the cache memory. It is the opposite of a cache hit, where the system successfully retrieves the data it requested from the cache. In the event of a cache miss, the system or app tries to find the data elsewhere, searching the main database for the data it needs. If found in the database, the system usually copies and stores the data in the cache so that the next search for the data is not a cache miss.
Because the primary database is more extensive and slower, searching for data takes more time, which can result in the site experiencing latency and performance issues. Additionally, each cache miss affects the speed of the site and causes a delay, also called a miss penalty. So, minimizing cache misses as much as possible is vital.
See also: memory cache, low latency
Three main reasons for a cache miss
- Compulsory miss: Data was never in the cache memory.
- Capacity miss: Data was in the cache but was removed because of low storage space.
- Conflict miss: Data was in the cache but was forced out because it was not associative enough.