PromptForge
AI Glossary

Cost & performance

Prompt caching

Also known as: context caching, cache

Definition

Prompt caching stores the processed form of a repeated prompt prefix so subsequent requests reusing it are cheaper and faster. Cached input tokens typically cost a fraction of normal input tokens.

Many applications send a large, stable prefix on every request — a long system prompt, a document, a set of few-shot examples — followed by a small variable part. Caching lets the provider skip reprocessing the stable portion.

Discounts are substantial, often 75-90% on cached tokens, with latency improvements as well. The requirement is that the prefix be byte-identical, which has a design implication: put stable content first and variable content last. A timestamp at the top of your prompt defeats caching entirely.

Cache lifetimes are short — typically minutes — so this helps high-frequency workloads much more than occasional requests.

Related terms

Put this into practice

Understanding the term is step one. Our free courses and tools let you actually use it.