AI Dictionary › Fondamenti AI

Caching

Caching is the technique of keeping a copy of data or computed results in fast storage so they can be reused instead of being recomputed or refetched. It is one of the most universal ideas in computing: nearly every system, from CPUs to browsers, contains at least one cache. The underlying bet is simple: whatever was requested once is likely to be requested again.

Definition

What it is

Caching is the technique of keeping a copy of data or computed results in fast storage so they can be reused instead of being recomputed or refetched. It is one of the most universal ideas in computing: nearly every system, from CPUs to browsers, contains at least one cache. The underlying bet is simple: whatever was requested once is likely to be requested again.

How it works

When a request arrives, the system checks the cache first: if the item is there (a cache hit) it is returned immediately; if it is missing (a cache miss) the system fetches or computes it from the slow source and stores a copy for next time. Because fast memory is scarce, replacement policies such as LRU (Least Recently Used) decide which entries to evict when the cache fills up, and a TTL (time to live) defines when a cached entry becomes stale.

Applications

Modern AI relies on caching everywhere: LLM platforms offer prompt caching to reuse the static prefix of long prompts and cut cost and latency, RAG systems cache precomputed embeddings, and conversational apps cache answers to frequent questions. Beyond AI, caches speed up CPUs, databases, web APIs and content delivery networks.

History & etymology

The word comes from the French cacher, to hide: a cache is literally a hiding place, like a hunter's stash of supplies. The computing term took hold in 1967-68 with the IBM System/360 Model 85, the first commercial computer with a cache memory; IBM lore credits Lyle R. Johnson with proposing the name over the clumsier high-speed buffer. Maurice Wilkes had anticipated the concept in 1965 with his proposal for slave memories.

Definizione (italiano)

Il caching è la tecnica di conservare una copia di dati o risultati già calcolati in una memoria rapida, per riutilizzarli invece di ricalcolarli o riscaricarli. È uno dei principi più universali dell'informatica: quasi ogni sistema, dal processore al browser, contiene almeno una cache. L'idea di fondo è semplice: ciò che è stato richiesto una volta verrà probabilmente richiesto di nuovo.

Quando arriva una richiesta, il sistema controlla prima la cache: se il dato è presente (cache hit) lo restituisce subito, se manca (cache miss) lo calcola o lo recupera dalla fonte lenta e ne salva una copia per le richieste future. Poiché la memoria rapida è limitata, politiche di rimpiazzo come LRU (Least Recently Used) decidono quali voci eliminare quando la cache si riempie. Un parametro chiamato TTL (time to live) stabilisce dopo quanto tempo un dato in cache va considerato scaduto.

Nell'AI moderna il caching è ovunque: le piattaforme LLM offrono il prompt caching per riutilizzare la parte iniziale di prompt lunghi e ridurre costi e latenza, i sistemi RAG mettono in cache gli embedding già calcolati, e le applicazioni conversazionali salvano le risposte a domande frequenti. Fuori dall'AI, le cache accelerano CPU, database, API web e reti di distribuzione dei contenuti.

La parola deriva dal francese cacher, nascondere: una cache è letteralmente un nascondiglio, come quelli dei cacciatori per le provviste. In informatica il termine si affermò nel 1967-68 con l'IBM System/360 Model 85, il primo computer commerciale con memoria cache; secondo la tradizione IBM fu Lyle R. Johnson a proporre il nome al posto del più goffo high-speed buffer. Il concetto era stato anticipato da Maurice Wilkes nel 1965 con la sua proposta di slave memories.

Related terms

More in Fondamenti AI

Put it into practice

From our network

HSE Genius — AI for Safety Data Sheets

Extract SDS data, H phrases and ECHA compliance checks in seconds, powered by AI.

Visit hsegenius.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.