NachschlagenQuellenregister

Dokumentationerreichbar

Anthropic, Prompt caching in Claude Code

code.claude.com (externe Seite)

Die Her­stel­ler­do­ku­men­ta­tion zum Prompt Caching in Claude Code. Jede Anfrage schickt den ganzen Verlauf erneut, und der Anbieter liest den unveränderten Anfang aus dem Zwischenspeicher. Die Seite nennt, welche Handlungen diesen Speicher entwerten, etwa ein Modellwechsel oder das Verdichten, und was das Verdichten selbst kostet. Sie nennt außerdem die Lebensdauer: eine Stunde für das Hauptgespräch in einem Abo innerhalb der enthaltenen Nutzung, sonst fünf Minuten. Stand 10.10.2026.

geprüft 10.11.2026

Worauf sich diese Seite beruft, wörtlich, abgerufen am 10.10.2026:

  • The model doesn't remember anything between requests, so Claude Code re-sends the full context: the system prompt, your project context, every prior message and tool result, and your new message.bestätigt 10.11.2026
  • Without caching, the API would reprocess your full history on every turn.bestätigt 10.11.2026
  • The match is exact, so a change anywhere in the prefix recomputes everything after it.bestätigt 10.11.2026
  • Cached prefixes expire after a period of inactivity.bestätigt 10.11.2026
  • Each request that hits the cache resets the timer, so the cache stays warm as long as you keep working.bestätigt 10.11.2026
  • Unless you choose a TTL yourself, Claude Code requests the one-hour TTL only on a Claude subscription within your plan's included usage.bestätigt 10.11.2026
  • In Claude Code, the cache is effectively scoped to one machine and directory.bestätigt 10.11.2026
  • Rewinding truncates back to a prefix that is already cached, rather than building a new one as compaction does.bestätigt 10.11.2026
  • To turn idle compaction off, set idleCompaction to falsebestätigt 10.11.2026
  • The request repeats your conversation’s system prompt, tools, and the history being summarized.bestätigt 10.11.2026
  • By design, this invalidates the conversation layer: the next request has a new, shorter history that doesn’t share a prefix with the old one.bestätigt 10.11.2026
  • It ends with a summarization instruction.bestätigt 10.11.2026

05 Kontext und Sitzungen

Alle Quellen

↑↓ auswählenEnter öffnenDie Suche läuft im Browser. Nichts wird übertragen.