Study · Claude Course

Prompt Caching

Reuse the computational work of processing repeated input: when identical input recurs, Claude retrieves cached work → faster and cheaper.

type conceptstatus activeapi · performance · cost · caching

Key points

  • Cache lasts up to 1 hour; needs a manual cache breakpoint.
  • Requires longhand text blocks (cache_control: ephemeral); shorthand strings can't cache.
  • Everything up to and including the breakpoint is cached; any earlier change invalidates it.
  • Order matters: tools → system prompt → messages. Max 4 breakpoints; min 1024 tokens.
  • Usage fields: cache_creation_input_tokens (first write) vs cache_read_input_tokens (reads).

Sources

  • 2026-06-28-claude-course
Compiled from wiki/study/claude-course/Prompt-Caching.md · git is the source of truth