Technique
Prompt caching
Reusing the processed form of a repeated prompt prefix to lower cost and latency on later requests.
What is Prompt caching?
For developers who send the same long instructions or documents to a model again and again, and want to pay less and wait less for it.
- Use it when
- Many requests start with the same long text, such as fixed instructions, a manual or a codebase.
- Watch out for
- It only helps when the repeated part is identical and comes first. Change one word early in the text and the saving is lost.
Written by our editors, last reviewed on .
How to start
- Put the part that never changes at the start of the request.
- Put what changes, such as the user's question, at the end.
- Switch on caching as your model provider describes, then check the saving on your bill.
Signals. What has been measured, and where.
Insufficient data
No trend history or community ratings have been measured for this entry. When they are, they will appear here with their sources.
Questions and answers. Prompt caching, in short.
What is Prompt caching?
Reusing the processed form of a repeated prompt prefix to lower cost and latency on later requests. For developers who send the same long instructions or documents to a model again and again, and want to pay less and wait less for it.
How do I start with Prompt caching?
Put the part that never changes at the start of the request. Put what changes, such as the user's question, at the end. Switch on caching as your model provider describes, then check the saving on your bill.
When should I use Prompt caching?
Many requests start with the same long text, such as fixed instructions, a manual or a codebase.
What should I watch out for with Prompt caching?
It only helps when the repeated part is identical and comes first. Change one word early in the text and the saving is lost.
No related topics are published yet.
More in AI models and infrastructure. The highest heat this month first.
- Frameworkllama.cpp
- FrameworkTransformers
- ToolLM Studio
- FrameworkvLLM
- ToolOpenRouter
- IntegrationModel Context Protocol
Do you make Prompt caching? Show its heat on your site
A small picture with this month’s heat, which updates by itself and links to this page. Paste one of these where you want it.
For a web page
<a href="https://aitrendsradar.com/topics/prompt-caching"><img src="https://aitrendsradar.com/badge/prompt-caching.svg" alt="Prompt caching on AI Trends Radar" height="28"></a>For a README (Markdown)
[](https://aitrendsradar.com/topics/prompt-caching)