What is it?
A cache is a fast temporary store for data that can be reused.
A cache can reduce latency and load on a database or service, but cached data may become stale and often needs an expiration or invalidation policy.
MODULE 07 · SYSTEM ARCHITECTURE
A cache stores reusable data closer to the next request so the system can avoid repeated work.
A cache is a fast temporary store for data that can be reused.
A cache can reduce latency and load on a database or service, but cached data may become stale and often needs an expiration or invalidation policy.
Think of a cache like keeping frequently used documents on your desk instead of walking to a filing room every time.
Return reusable data from a faster location.
Avoid recomputing or refetching the same result.
Lower repeated reads against a database or service.
On a cache miss, the system reads from the source, returns the result, and may store it for a later request.
A product page cache can reuse the same catalog response for many shoppers. The product team must decide how quickly price, inventory, and promotion changes need to appear.
A cache often sits between an application and a slower source such as a database or external API. It works alongside a load balancer, which distributes requests across application instances.
A cache prioritizes fast reuse; a database is usually the durable source of record.
A cache stores reusable results; a load balancer chooses a server for a request.
| ENGLISH TERM | 中文 | SIMPLE ENGLISH | 中文小白理解 |
|---|---|---|---|
| Cache | 缓存 | A fast temporary store for reusable data. | 保存可重复使用数据的快速临时存储。 |
| Cache Hit | 缓存命中 | The requested data is found in the cache. | 请求的数据已经在缓存中找到。 |
| Cache Miss | 缓存未命中 | The requested data is not in the cache. | 缓存中没有请求的数据。 |
A cache makes repeated reads faster, but freshness and invalidation are product and system decisions.