Skip to content
Eldan.ai
Glossary

Prompt caching

Prompt caching is a provider feature that reuses the work done on the unchanging beginning of a prompt, so repeated prefixes are billed at a lower rate and answered faster.

It only helps when stable content such as instructions and examples comes first and varies last. Minimum lengths and lifetimes differ between providers.

Anything that changes inside the prefix, a timestamp, a user name or a reordered example, breaks the match and silently turns the discount off. Structure prompts as stable first, dynamic last.

Common mistake. Putting the current date at the top of the system prompt.

In practice. Move volatile fields to the end, read the cache usage fields in the response to confirm hits, and read the provider’s documentation for minimum prefix length and cache lifetime.

  • Token

    A token is the unit of text a model reads and writes: usually a word fragment, a whole short word or a punctuation mark. Providers count and bill in tokens, and context limits are measured in them. English averages roughly four characters per token, while Russian text usually needs more tokens per word.

  • Context window

    The context window is the maximum number of tokens a model can take into account in one request, covering the prompt, the conversation and, depending on the provider, the reply. It is working memory for a single call, not long-term memory: anything you want the model to use has to be sent again every time.

  • Model routing

    Model routing sends each request to the model best suited to it, usually a cheaper, faster model for easy cases and a stronger one for hard cases. It can cut cost and latency a lot, but only if you can measure quality per route and know how often the cheap model is good enough.

Cite this page

Eldan Abdrashim. "Prompt caching." Eldan.ai, 23 November 2026. https://eldan.ai/glossary/prompt-caching.

The date you read it is added when you copy.

BibTeX

@online{abdrashim2026prompt,
  author = {Eldan Abdrashim},
  title = {Prompt caching},
  organization = {Eldan.ai},
  date = {2026-11-23},
  year = {2026},
  month = nov,
  url = {https://eldan.ai/glossary/prompt-caching},
  langid = {english}
}

All terms

Section: Cost and operations. Last updated 23 Nov 2026.