Prompt Cache
A mechanism where calculations for the repeating part of the prompt — such as a long system prompt — are saved and reused in subsequent requests.
Why
- cheaper: no payment for repeated calculations;
- faster: less delay Time to First Token;
- more efficient for long stable prefixes.
How it works
If the beginning of a new request matches a cached prefix, the prefill phase for it is skipped.