# Cache

> A fast store of copies. The same data loads quicker next time.

**Field:** Software Development  
**Category:** Compilers & Runtimes  
**Also known as:** Caching, Cached, Cache Hit, Cache Miss

## Think of it like

Think of it like keeping your snacks on your desk. You do not walk to the kitchen each time.

## Definition

A cache is a small, fast store that keeps copies of data you are likely to need again. The first time, the data comes from the slow place, like a database or another server. A copy is kept in the cache. The next time, it comes from the cache, which is much faster. Finding the data there is a cache hit, and missing it is a cache miss.

## Example

Emma's shop page asks the database for the same 20 best sellers on every visit. She caches the list for 5 minutes, and the page loads 10 times faster.

## Why it matters

A cache is one of the cheapest ways to make an app fast. It also takes load off the database.

## Common mistake

Caching data that changes often, then showing people old prices or stock. Every cache needs a plan for when its copy goes stale.

## Three principles

- **Keep a copy.** Near where it is used.
- **Hit or miss.** Found, or fetched again.
- **Copies go stale.** Plan when to refresh.

## Related terms

- [Cache Invalidation](https://learn.benibix.com/term/development/cache-invalidation)
- [Memoization](https://learn.benibix.com/term/development/memoization)
- [Latency](https://learn.benibix.com/term/infrastructure/latency)
- [Database](https://learn.benibix.com/term/development/database)

---

Source: https://learn.benibix.com/term/development/cache
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
