A cache is a fast, temporary storage layer for data or results that would otherwise need to be fetched from a database or recalculated. Check it first; when the result is missing, do the slower work and save the answer for next time. section 2.4.4
A dashboard without repeat work
A dashboard summary makes three slow database queries on every request. With 100 users, that means 300 queries. A cache can serve a saved summary on a hit; on a miss, the system runs the queries and stores their result. One example sets the cached result to expire after ten minutes. section 2.4.4
Caching trades extra complexity and less-live data for speed: the cache is another component to manage, deploy, and monitor, and users may not see changes immediately. Reusing an expensive result can also reduce repeated database work enough to delay adding servers. section 2.4.4 section 10.6
Figure 2.8 By checking a fast cache first, the system avoids expensive database queries. A Cache Miss creates a temporary delay to fetch and save data, but each subsequent request becomes nearly instantaneous.

The diagram shows the cache-first path: a miss adds a temporary delay, while later requests can use the saved result. section 2.4.4
For lower latency, a system can use multiple cache levels: a local cache in the application server’s memory and a shared distributed cache. The local cache avoids a network trip, while the shared cache serves the wider system. section 10.6
















































