Keep a copy.
Check its age.
A stored copy can save a journey. The next question is whether it is still the copy you need.
An educational explanation of a general technology concept.
Reuse the work
A cache keeps data for reuse. Instead of retrieving or calculating the same thing repeatedly, a system first checks whether a suitable copy is already available. Browser caches and content delivery networks apply this idea in different places.
When the requested item is present and usable, the lookup is a cache hit. When it is absent, the system must obtain it elsewhere. That is a cache miss. Keeping a copy closer to the requester can reduce repeated transfer or computation, although the benefit depends on the situation.
Availability is not freshness
Imagine a hypothetical event website with a program that changes during the week. Saving yesterday's program may make it quick to retrieve, but speed does not make its session times current. The system needs a policy for deciding when reuse is acceptable.
A freshness lifetime allows reuse for a defined period. After it expires, a cache may check with the source to learn whether the item changed. This is revalidation. If the content remains valid, another full transfer may be unnecessary; otherwise a new copy can replace it.
Some policies permit an older copy while a refresh happens in the background. Others require a successful check first. These choices matter whenever a recent change could affect a reader's decision.
Consider what can wait
In the event example, a decorative illustration and a last-minute room change need different treatment. The illustration may tolerate longer reuse. The program needs a policy that reflects how quickly changes should reach readers.
A cache is not automatically an archive or a backup. Copies may expire or be removed to make space, and they may not preserve earlier versions. Caching is a strategy for reuse, with freshness and storage limits built into the decision.
When evaluating a cached result, ask where the original lives, how the copy is checked and what happens when the source cannot be reached.