Scalability and Performance · Remembering answers
Caching
A cache keeps copies of frequently used data somewhere fast, so most requests never reach the slow database. The hard part is keeping those copies correct.
- Time25 min
- LevelDeveloper
- Experiments2 live
- Check6 questions






Application gets a request for product 42 and asks the cache for
Cache has no entry, so it returns a miss.
Database the application runs the query; it takes about 20 ms.
Next request finds
Browser cache on the user's device; zero network cost.
CDN edge in a datacenter near the user.
Application memory inside each server process; fastest on the server side, but not shared.