The cache reuses stable prompt prefixes to reduce latency and cost. Understand TTL, breakpoints, invalidation and metrics for production.

Direct answer

Anthropic's prompt caching reuses identical tool prefixes, system instructions, and messages, avoiding reprocessing the same context in nearby calls. The default TTL is five minutes, with an option of one hour, and the effectiveness appears in the cache_creation_input_tokens and cache_read_input_tokens fields. The gain only occurs when the prefix remains identical and meets the model minimum; Timestamps, reordered tools, or changed instructions can invalidate the cache.

Caching requires separating the stable from the variable

Policies, examples and tool definitions must appear before data that changes with each request. A timestamp inserted into the prefix can prevent all hits.

TTL keeps pace with the flow

Five minutes attend active conversations; an hour can serve spaced analyses, with a higher writing cost. The choice needs to consider real cadence and repetition.

Metrics confirm the gain

Cache read and cache creation must be monitored along with latency and cost. Without cache reading, the optimization exists only in the code, not in the result.

Tools also change the prefix

Changing settings or their order invalidates subsequent layers. Dynamic catalogs must use mechanisms that preserve the stable set when the platform supports it.

Nexus Reading

Prompt caching is context engineering: stabilizing contracts, measuring hits, and maintaining privacy. The sustainable economy depends on predictable architecture, not on activating an isolated field.

FAQ

How long is the cache?

The default is five minutes and there is an option for one hour, according to the current documentation.

How do I know if there was a cache hit?

Check cache_read_input_tokens; cache_creation_input_tokens shows content written to the cache.

Does cache store prompt text?

Anthropic reports that KV representations and hashes are in memory during TTL, without storing the raw text at rest.

Essential guides to delve deeper into the decision

Primary sources and references

This editorial analysis was produced by Nexus from the official sources below, consulted on September 20, 2026. The text is original and interprets practical implications for companies.

Date reported by main source: official documentation consulted on September 20, 2026; technical analysis.