cache_control blocks in message content.
This allows you to explicitly mark specific portions of your prompts for caching with custom TTL (time-to-live) settings,
giving you precise control over what gets cached and for how long.
View cache analytics in the Requesty Console.
How Manual Caching Works
Manual caching usescache_control blocks embedded within message content to explicitly specify which portions of your prompt should be cached.
This approach gives you fine-grained control over:
- What gets cached: Mark specific content blocks for caching
- Cache duration: Set custom TTL (time-to-live) values
Content Structure with cache_control
To use manual caching, structure your message content as an array of content blocks, and add thecache_control field as desired:
TTL Field
Thettl (time-to-live) field specifies how long the content should remain cached. The default value is 5m.
You can also set this to 1h when using Anthropic and Vertex only. Other providers do not support that.