Semicolony ELI5 · comic

Caching.

Keeping the milk on the counter instead of walking to the fridge every time.

  1. All the way over there?
    fridge (far)
    1

    You want milk. It’s in the fridge across the room — the slow, far-away source.

  2. a miss — full price
    2

    First trip is a miss: you walk to the fridge, pay full price, and grab the milk.

  3. cache counter (close, fast)
    3

    On the way back you leave it on the counter — a small, fast store close at hand.

  4. Instant. Lovely.
    a hit
    4

    Next time is a hit: the milk’s right there, no trip needed.

  5. Wait… is this off?
    gone off…
    5

    The hard part: a cached copy goes stale the moment the real data changes.

  6. TTL toss the stale copy
    6

    So you set a time limit, or toss the copy the instant the source changes — cache invalidation.

Milk on the counter beats walking to the fridge — until the milk goes off. (Bit gets thirsty.)
Semicolony semicolony.dev/eli5/caching/comic
← All ELI5 explainers