Published 2026-06-21 · reference numbers, verify before budgeting
If your app sends the same long system prompt, the same retrieved documents, or the same growing chat history on every call, you're paying full price to re-read text the model has already seen seconds ago. Memorizzazione nella cache immediata is the fix, and it's the single biggest line-item discount most teams never turn on. Done right it cuts input cost by 50% to 90%. Here's how it works, the 2026 numbers, and where it quietly doesn't help.
Una fattura LLM è per lo più input tokens × price + output tokens × price. Caching attacks the input half. When you mark a chunk of the prompt as cacheable, the provider stores its processed form for a short window; on the next call that reuses the exact same prefix, you're billed a fraction of the normal input rate for those tokens instead of the full amount. The output price is untouched — caching only discounts the part you keep resending.
| Fornitore | Cached input price | Note |
|---|---|---|
| OpenAI | ~50% dell'input | Automatic on long prompts, no code change |
| Anthropic (Claude) | ~10% of input on reads | Up to 90% off — but ~25% write premium first time |
| Google Gemelli | ~25% of input | Context caching; may add a small storage fee |
Say a support assistant sends a 2,000-token system prompt + knowledge base on every message, plus ~200 tokens of the user's actual question, and returns ~300 output tokens. At 10,000 conversations a month, the fixed 2,000-token block is re-sent 10,000 times. Using a model at $2.50 / 1M input:
Scalalo a 100.000 o 1 milione di conversazioni e il prefisso statico fa la differenza tra una fattura comoda e una allarmante. Più grande e ripetuto è il contesto fisso, maggiore è il valore della memorizzazione nella cache: le app RAG e gli agenti con prompt di sistema lunghi ne traggono i maggiori vantaggi.
Memorizza nella cache quando invii di nuovo un blocco di contesto ampio e identico frequentemente e rapidamente: prompt di sistema, definizioni di strumenti, documenti RAG, esempi di poche riprese, lunga cronologia di chat. Non preoccuparti di chiamate una tantum, richieste altamente variabili o carichi di lavoro pesanti. Strutturare il prompt static-first, variable-last, and the discount is close to free money. Put a number on your own case with the calcolatore rapido del risparmio di memorizzazione nella cache, and compare models on the Calcolatore dei costi dell'API AI.
Typically 50–90% off the input price for the cached portion, depending on provider. It only discounts repeated input tokens, not output.
No. It's a billing/latency optimization — the model sees the same tokens, you just pay less to re-send the cached prefix. Responses are unchanged.
Quasi sempre il premio di scrittura (ad esempio il supplemento di circa il 25% di Anthropic per creare la cache) sui prefissi che non vengono riutilizzati abbastanza prima della scadenza, o un prefisso che cambia ogni chiamata in modo che non venga mai raggiunto. La memorizzazione nella cache ripaga con un riutilizzo frequente e identico.
Stime di riferimento: verifica sempre sconti e commissioni sulla pagina dei prezzi ufficiali del fornitore.