The three providers below are Anthropic (Claude), OpenAI, and Claude served through Google's Gemini Enterprise Agent Platform, which is a useful third case because it runs the same models under a different operational wrapper.
How breakpoints are declared
Anthropic offers two modes. Automatic caching adds a single top-level cache_control field, and the system applies the breakpoint to the last cacheable block and moves it forward as the conversation grows. Explicit caching places cache_control on individual content blocks for fine-grained control Anthropic docs. The docs recommend automatic caching as the simplest start, particularly for multi-turn conversations.
OpenAI's model is different: caching is applied automatically on prompts that qualify, and you cannot and need not place a breakpoint OpenAI's announcement. The API caches the longest prefix previously computed, and the guide describes the cache as storing KV tensors rather than tokens OpenAI guide.
The portability rule: never hard-code cache_control at call sites. Put marker emission behind one function that takes the prompt parts and the provider name, and returns either markers or nothing.
How long the cache lives
Anthropic's default lifetime is 5 minutes, refreshed at no additional cost each time the cached content is used. A 1-hour tier exists at a higher write premium. Crucially, the lifetime is measured from the start of the request that writes or reads the entry, not from the end of its response, so a 4-minute streaming response leaves roughly 1 minute for the next request to arrive Anthropic docs. Technspire's analysis of the pricing mechanics reaches the same conclusion: long-streaming agent turns eat their own TTL Technspire.
OpenAI states caches are typically cleared after 5 to 10 minutes of inactivity and are always removed within one hour of last use OpenAI announcement.
Through Google's platform, the behavior follows Anthropic's documentation, with one operational addition worth knowing: caches are scoped to your Google Cloud project and cannot be used by other projects, and an administrator can disable explicit caching for a project, after which requests with caching enabled are rejected Google Cloud's Claude prompt caching page.
The portability rule: record a TTL assumption per deployment in configuration, and size your scheduling to it. If your job runs every 12 minutes, a 5-minute cache will miss on every run and you will pay the write premium forever.
Minimum prefix length before caching applies
OpenAI applies caching automatically on prompts longer than 1,024 tokens, caching the longest previously computed prefix starting at 1,024 tokens and increasing in 128-token increments OpenAI announcement.
Anthropic sets a per-model minimum, and it is not monotonic across generations. One implementation guide tabulates minimums ranging from 512 tokens on newer Opus and Fable models, 1,024 on Sonnet 5 and Sonnet 4.6, 2,048 on Opus 4.7, and 4,096 on Opus 4.6, Opus 4.5 and Haiku 4.5, and notes that a prefix under the minimum silently does not cache: you see a cache creation count of zero and keep paying full price Hidekazu Konishi's guide. Technspire's page repeats those per-model minimums Technspire.
The portability rule: assert the minimum in code. Before shipping, count the tokens of the stable prefix and compare against the smallest minimum among the models you route to, not just the model you tested on.