cache
/ KASH /
A cache is a stash of results kept somewhere close and fast, so you don't have to redo slow work every time. The first time is expensive — fetch from a faraway server, run a heavy calculation — but you save the answer, and every time after that you just grab the saved copy.
Think of it like keeping your everyday mugs on the counter instead of climbing up to the top shelf each morning. Your browser caches images so a page loads instantly on your second visit; a database caches frequent queries so it doesn't have to recompute them.
The catch is staleness: a cached copy can fall out of date with the real thing. Deciding when to throw the old copy away is 'cache invalidation' — only half-jokingly called one of the two hardest problems in computer science.
# First call: slow, hits the network GET /api/weather → 800 ms # Cached call: fast, served from memory GET /api/weather → 2 ms (cache HIT)
Same request, second time around: the cache turns 800 ms into 2 ms.
If something "looks old" after an update, try clearing the cache — you're probably staring at a stale copy.