cache
A cache is a temporary storage that keeps copies of frequently used data on hand so they do not need to be re-downloaded or recalculated every time.
In plain terms
Think of the kitchen counter: you do not keep the salt, oil, and your favorite mug deep in the pantry, but within reach, because you need them several times a day. The cache does the same on a computer: it places a copy of what you use frequently nearby so you can access it immediately.
The original data remains in place, for example on a remote server or slower storage. The cache is only a copy, so it can be deleted at any time: in this case, nothing is lost, only the next load will be slower.
In AI systems, caching saves both time and money. If an agent starts every request with the same long instruction and document, the provider can temporarily store the processed state of this unchanged initial part. On the next request, this part does not need to be reprocessed. This is called prompt caching: the response arrives faster, and the recurring part becomes significantly cheaper.
How it works
- When a program requests data, it first checks the cache to see if it is already there.
- Once found, it retrieves the result immediately, without needing to take the slow route.
- If missing, the program retrieves it from the original source, then stores a copy in the cache for next time.
- Since space is limited, the system occasionally removes items, typically those used least recently. Stored items often also have an expiration date.
- If the original data changes, the old copy must be invalidated; otherwise, the program displays an outdated version.
An everyday example
You open a news portal, and the first load takes a few seconds, but the second time it appears almost instantly. Your browser has saved the logo, fonts, and images. When a website appears strangely in an old format and you are advised to "clear the cache," you are deleting these saved copies.
Who is affected
A common misconception
Limits and risks
- A copy in the cache may become outdated, so you may sometimes see an old price, an old version of an article, or an old image.
- The cache takes up space and can grow to several gigabytes on phones or laptops.
- On a shared or someone else's machine, the cache can reveal which pages you visited, and in a poorly configured system, sensitive data may stay behind in it.
- Caching AI requests only helps if the beginnings of the requests match exactly. Moreover, the stored content expires quickly: usually after a few minutes, and with some providers, for an extra fee, after at most a few hours or a day.
Similar, but not the same
- memory (RAM) – Memory is the computer's general workspace for every running program, while the cache specifically holds copies of frequently needed data at hand.
- cookies – A cookie stores small data about you and your settings for a website, while the cache stores elements of the page itself for faster loading.
- backup – A backup serves to preserve data and you must not lose it; a cache serves only speed and can be discarded at any time.
Related concepts
data storage, computing infrastructure, performance optimization
prompt caching, browser cache, processor cache, semantic cache
content delivery network (CDN), memory, latency, token, context window
A brief history
The idea of fast auxiliary memory was described by British computer scientist Maurice Wilkes in 1965, who still called it "slave memory". The term "cache" spread in 1967–1968 in connection with the IBM System/360 Model 85. The word comes from the French verb "cacher" (to hide) and originally meant a hidden stock or hiding place.
Where things stand
The cache has been a basic element of every computer, phone, and web service for decades. By the end of 2026, prompt caching has also become a common tool among major AI providers, mainly to reduce costs for multi-step agents.
In the news
- Linus Torvalds used Claude Code to rewrite part of the Linux page cache; reviewers found a race conditionOct 12, 2026 · Code
- Codex moves to token-based billing from April, with credits and plan limitsSep 25, 2026 · Code
Also known as
cache · cache · cache · temporary storage · caching · caching · caching · prompt caching
Sources
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.