Zenaique
Glossary · Production

Prompt Caching

Also known as: Provider prompt caching

Provider caches the attention state of common prompt prefixes, so the same prefix in next request skips that compute.

A provider-side optimization where common prompt prefixes (system prompts, RAG context blocks) are cached server-side so subsequent requests with the same prefix skip redundant attention compute. Anthropic and OpenAI both expose this.

In practice

Direct cost reduction (75-90% off on the cached portion). Knowing what prefixes to cache and TTL constraints matters for cost-tuning interviews.

How it compares

KV cache reuses attention within a single generation; prompt caching reuses that cache across separate requests that share a prefix.

Prompt caching skips compute for byte-identical prefixes; semantic cache skips the whole inference call for semantically similar prompts.

Comparisons that include Prompt Caching

Related topics

Related terms