Caching.
Keeping the milk on the counter instead of walking to the fridge every time.
- All the way over there?1
You want milk. It’s in the fridge across the room — the slow, far-away source.
- 2
First trip is a miss: you walk to the fridge, pay full price, and grab the milk.
- 3
On the way back you leave it on the counter — a small, fast store close at hand.
- Instant. Lovely.4
Next time is a hit: the milk’s right there, no trip needed.
- Wait… is this off?5
The hard part: a cached copy goes stale the moment the real data changes.
- 6
So you set a time limit, or toss the copy the instant the source changes — cache invalidation.
Semicolony semicolony.dev/eli5/caching/comic