A cache stores frequently used responses near the requester. A valid value for the key is a hit; an absent or expired value is a miss.
The demo alternates between request routes. A hit returns at the cache; a miss reaches the origin and fills the cache. Expiration and invalidation rules matter as much as speed.
When to use
Use it to reduce repeated lookup latency and origin load. Design cache keys so private responses are not shared across users.