ModelRefs / Cache Priming — Prompt Pattern
Cache Priming — Prompt Pattern
Order prompt content so provider prefix caches hit on every request.
Overview
Put static content (system prompt, schemas, few-shot examples) FIRST, dynamic user content LAST so prefix caches activate.
When to use it: High-volume API calls share most of the prompt.
Pattern details
| Pattern class | optimization |
|---|---|
| Difficulty | intermediate |
| Also known as | prefix caching, prompt prefix |
| Last reviewed | 2026-06-07 |
Known failure modes
- Cache miss from tiny prefix change — One token diff invalidates cache. Mitigation: Pin prefixes; lint for accidental edits.
When not to use it
- Putting timestamps or request IDs in the system prompt.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Cache Priming — Prompt Pattern.
Frequently asked questions
When should I use the Cache Priming prompt pattern?
High-volume API calls share most of the prompt.
What are common failure modes of Cache Priming?
Cache miss from tiny prefix change
Does Cache Priming work across models?
Yes when the anatomy is preserved — see model compatibility matrix on the pattern page.