Each answer takes 50 ms, and the line keeps growing.
Users wait, though the answer was the same every time.
A cache is a fast copy kept close to the app.
Most requests are answered without touching the slow database.
It trades freshness for speed: the copy can be old.
Reach for it when
When the same read repeats thousands of times a minute and the answer rarely changes. Not for data nobody asks twice.
The catch
Someone changes a price, but the copy still shows the old one, and shoppers see it until the copy expires.
Say it in an interview“I would cache hot reads in front of the database. It cuts latency and load, and I would use expiry or delete on write to limit stale data.”