A cache key is an identifier that selects the cached value associated with a request or function input. A hit returns that value; a missing or expired key produces a miss requiring retrieval from the backing store. section 6.2 section 6.3.1
In a cache-aside workflow:
- The application looks up the cache using the key. section 6.3.1
- A hit returns the associated value directly. section 6.3.1
- A miss causes the application to query the backing store, transform the result, and store it under the same key. section 6.3.1
User information keyed by user ID
An application uses a user ID as the cache key, queries the database when the key is absent, converts the returned user information to JSON, and stores that JSON under the ID. section 6.3.1
Figure 6.1 With cache-aside caching, the client first looks up a key from the cache. On a cache miss, the client queries the database and updates the cache.
The cache-aside sequence shows the key lookup, database fallback, and cache update after a miss. section 6.3.1


