Prompt Caching

Last updated

What is Prompt Caching?

Prompt caching in Claude Code is a performance-optimizing feature that stores the frequently used "prefixes" of your conversations—such as your entire codebase state, system instructions, and tool definitions—so they don't have to be reprocessed from scratch with every new message. In an agentic environment where Claude often re-reads your files multiple times to maintain context, caching acts as a "checkpoint" system: while the initial write to the cache carries a slight premium, every subsequent interaction that reuses that prefix receives a 90% discount on input tokens and up to an 85% reduction in latency. Claude Code handles this automatically by placing "cache breakpoints" at strategic points in the prompt (like after your CLAUDE.md and project structure), ensuring that even as your conversation grows, the "static" foundation of your project remains instantly accessible and cost-effective.

More in stage 11: Manage Context

Prompt Caching: common questions

Can I learn Prompt Caching in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Prompt Caching in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Prompt Caching tutorial for beginners?

It is lesson 86 of 109 in the free Claude Code roadmap, in stage 11, Manage Context. If you are new to Claude Code, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me