pub type BedrockCacheConfig = CacheConfig;Expand description
Prompt-caching configuration for the Bedrock provider (BedrockCacheConfig).
Aliased Type§
pub struct BedrockCacheConfig {
pub strategy: Option<CacheStrategy>,
pub ttl: Option<String>,
pub tools_ttl: Option<CacheSectionSetting>,
pub system_prompt_ttl: Option<CacheSectionSetting>,
pub messages_ttl: Option<CacheSectionSetting>,
pub cache_key: Option<CacheKey>,
}Fields§
§strategy: Option<CacheStrategy>Whether to skip caching for models that do not support it. Default CacheStrategy::Auto.
ttl: Option<String>TTL for every cache point, overridden by a per-section TTL; the provider default when unset.
Bedrock requires checkpoint TTLs to be non-increasing across tools, system and messages, so this TTL also fills in for a cache point placed by hand in the system prompt that carries none. A TTL written on such a point is left as written.
tools_ttl: Option<CacheSectionSetting>Cache the tool definitions. A TTL sets this section’s duration; false disables it.
Default true.
system_prompt_ttl: Option<CacheSectionSetting>Cache the system prompt, adding a cache point at its end. A TTL sets this section’s
duration; true uses ttl; false disables it. Default true.
messages_ttl: Option<CacheSectionSetting>Cache the conversation prefix, on the last user message. A TTL sets this section’s
duration; false disables it. Default true.
cache_key: Option<CacheKey>Stable identity a prompt-cache-routing provider (OpenAI) uses as its cache key. Unset, it
is derived per request as strands-<sessionId> when the agent has a session manager. The
resolved key is sent to the provider.