[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"glossary-prompt-caching::en":3,"gloss-cluster-prompt-caching::en":20,"gloss-next-prompt-caching::en":9},{"slug":4,"category":5,"name":6,"definition":7,"meta_desc":8,"faq":9,"schema_markup":9,"related":10},"prompt-caching","prompt-eng","Prompt Caching","Prompt caching is an API feature, offered by Anthropic, OpenAI, and other providers, that lets a static, repeated portion of a prompt (a long system prompt, reference documents, few-shot examples, or tool definitions) be processed once and cached server-side, so subsequent API calls that reuse the identical prefix skip re-processing that portion entirely — dramatically cutting both cost (cached input tokens are billed at a steep discount, often 90% cheaper) and latency (skipping computation on the cached prefix speeds up time-to-first-token) for any application that repeatedly sends large amounts of unchanging context. This directly addresses one of the biggest hidden cost centers in production LLM applications: many real-world prompts consist of a large stable portion (system instructions, a knowledge base excerpt, a long set of few-shot examples, tool\u002Ffunction definitions) plus a small variable portion (the actual user message), and without caching, the entire stable portion is fully reprocessed and billed on every single call, even though it hasn't changed. Anthropic's implementation, for example, lets developers mark specific prompt breakpoints as cacheable, with the cache persisting for a short window (typically around 5 minutes, refreshed on each use, with some providers offering longer-duration cache options at a different price point) — meaning a chat session or a burst of related API calls within that window benefits substantially, while cache benefits reset for genuinely new sessions after the window expires. For SaaS builders, prompt caching is one of the highest-ROI, lowest-effort optimizations available once an AI feature has real production traffic: it typically requires only restructuring a prompt so the static portion comes first and is clearly marked as cacheable, with no change to prompt content or model behavior, making it close to a \"free\" cost and latency win compared to compression (which requires actually shortening content and risks information loss) or model downgrades (which risk accuracy loss). Concrete worked example: a legal-document-analysis SaaS tool sends a 12,000-token system prompt (a detailed legal-analysis rubric plus 8 few-shot examples) with every single document-review request, and processes roughly 3,000 documents per day. Without caching, that 12,000-token prefix is fully billed and reprocessed 3,000 times daily. With prompt caching enabled and the static rubric\u002Fexamples marked as the cacheable prefix, only the first request in each cache window pays full price for that prefix — subsequent requests within the cache window pay the steep cache-read discount instead — cutting the team's daily input-token cost by well over half with zero change to the actual analysis quality, since the cached content is byte-for-byte identical to what would have been reprocessed anyway.","Prompt caching lets an API reuse the processed state of a repeated prompt prefix across calls, cutting cost and latency for static content.",null,[11,14,17],{"slug":12,"name":13},"context-stuffing","Context Stuffing",{"slug":15,"name":16},"context-window","Context Window",{"slug":18,"name":19},"prompt-compression","Prompt Compression",[21,25,28,31,35,38,41,44,45,48,51,54],{"slug":22,"category":5,"name":23,"updated_at":24},"analogical-prompting","Analogical Prompting","2026-08-24T02:46:37+00:00",{"slug":26,"category":5,"name":27,"updated_at":24},"automatic-prompt-optimization","Automatic Prompt Optimization",{"slug":29,"category":5,"name":30,"updated_at":24},"chain-of-density","Chain of Density (CoD)",{"slug":32,"category":5,"name":33,"updated_at":34},"chain-of-thought-prompting","Chain-of-Thought Prompting","2026-08-24T02:46:36+00:00",{"slug":36,"category":5,"name":37,"updated_at":24},"chain-of-verification","Chain-of-Verification",{"slug":39,"category":5,"name":40,"updated_at":34},"chunking","Chunking",{"slug":42,"category":5,"name":43,"updated_at":34},"constrained-decoding","Constrained Decoding",{"slug":12,"category":5,"name":13,"updated_at":34},{"slug":46,"category":5,"name":47,"updated_at":34},"delimiter","Delimiter",{"slug":49,"category":5,"name":50,"updated_at":24},"directional-stimulus-prompting","Directional Stimulus Prompting",{"slug":52,"category":5,"name":53,"updated_at":24},"emotion-prompting","Emotion Prompting",{"slug":55,"category":5,"name":56,"updated_at":34},"few-shot-prompting","Few-Shot Prompting"]