Skip to content

GlossaryFloor 2 · The Harnessthe block and its bolted-on plates: what gets added to itFloor 2 · The Harness

prompt caching

No. 066 · v2026-08FR: cache de prompt

Prompt caching keeps the work already done on the beginning of an input, so that a request starting with the same text does not have to do it again. Like a machine already brought up to temperature: the warm-up is not started again for every batch.

What it is not

Prompt caching is not memory. Memory makes a system remember you from one conversation to the next, which is a product choice; the cache changes nothing of what the model sees, it merely avoids recomputing, and a request served by the cache gives exactly the same answer. Nor is it a cache of answers: what is kept is an intermediate state of computation, not a result, and two different questions after the same preamble do indeed give two different answers.

In depth

The mechanism

The mechanism follows from the architecture. To produce an answer, the model first computes an internal representation of the whole input, and that computation depends only on what precedes each position. If two requests begin with the same thousand tokens, this work is identical: it can be kept and taken up again from there. The practical consequence is a reduction in price and in time to first answer, often very large for systems that repeat a long instruction at every call.

The rule of composition

This imposes a rule of composition that runs against habit: put the stable in front and the variable behind. Standing instructions, tool definitions, reference documents, examples: all of that at the head, identical to the character. The user’s question, the timestamp, their identifier: at the end. A single variation at the head, a date inserted into the first line for instance, is enough to invalidate the whole cache and bring the cost back to its initial level, without any error showing.

Two effects to watch

Two effects deserve watching. The first is temporal: these caches expire within a few minutes, so that the gain depends on the rhythm of the requests and a lightly used service benefits little from it. The second touches confidentiality: the cache belongs to one account and is not shared between customers, but it implies that a portion of your inputs stays stored for a few minutes at the provider’s, which is among the questions to ask during a data processing analysis.

Relations where the neighbours live

Check 3 questions · click your answer

Level 1 · Recognise

What does prompt caching keep?

Level 2 · Distinguish

You insert today’s date on the first line of your system prompt. What effect on the cache?

Level 2 · Distinguish

How is a prompt composed so as to take advantage of the cache?

No. 066 · v2026-08 · first written in · editorial responsibility Anthony Capirchio

Lexigraph, "Prompt caching", v2026-08, https://www.lexigraph.org/en/prompt-caching/, CC BY 4.0.

Report

What goes with your message

Entry · Prompt caching
No. 066 · v2026-08 · /en/prompt-caching

What is this about
0 / 600

It is used to reply to you, and for nothing else. What is recorded