Lesson 04.5
Negative caching
Negative caching stores a short-lived not-found result so repeated lookups for an absent key do not bypass the cache and hit the database every time.
🍪 The fast copy can be wrong
Ava and Ben are workers using the computer to manage order. The fast copy remembers things it found, but it also needs to remember “not here” for a little while.
In this lesson you'll
- 1Explain why asking again and again for something that is not there keeps the slow place busy, how remembering not-here for a short time helps, and why random new IDs need a different fix
- 2Watch the fast copy answer a request
- 3Guess where the unsafe gap appears
- 4Change the rule and protect the source of truth