Basic Terms

Cache

Wiktionary defines a cache as a store of things that will be required in the future, and can be retrieved rapidly. A cache is a collection of temporary data that either duplicates data located elsewhere or is the result of a computation. Data that is already in the cache can be repeatedly accessed with minimal costs in terms of time and resources.

Cache Entry

A cache entry consists of a key and its mapped data value within the cache.

Cache Hit

When a data entry is requested from cache and the entry exists for the given key, it is referred to as a cache hit (or simply, a hit).

Cache Miss

When a data entry is requested from cache and the entry does not exist for the given key, it is referred to as a cache miss (or simply, a miss).

System-of-Record (SoR)

The authoritative source of truth for the data. The cache acts as a local copy of data retrieved from or stored to the system-of-record (SOR). The SOR is often a traditional database, although it might be a specialized file system or some other reliable long-term storage. It can also be a conceptual component such as an expensive computation.

Eviction

The removal of entries from the cache in order to make room for newer entries (typically when the cache has run out of data storage capacity).

Expiration

The removal of entries from the cache after some amount of time has passed, typically as a strategy to avoid stale data in the cache.

Hot Data

Data that has recently been used by an application is very likely to be accessed again soon. Such data is considered hot. A cache may attempt to keep the hottest data most quickly available, while attemping to choose the least hot data for eviction.