Skip to main content

Module cache

Module cache 

Source
Expand description

Cache breakpoints for Anthropic prompt caching.

§Where to place breakpoints

A cache_control: ephemeral marker tells the server “cache the request up to and including this block.” Typical strategies:

TTL choice: the default 5-minute cache is right for nearly all interactive workloads. "1h" requires the extended-cache-ttl-2025-04-11 beta header and is meant for batch / long-running pipelines where the same prefix sees sustained traffic.

Enums§

CacheControl
Marks a cache breakpoint on a content block, system prompt, or tool definition.