Caching Config • Rust AI Agent SDK
CachingConfig: Configuration for caching behavior
CachingConfig
Defined in the config module.
Rust AI Agent SDK
Configuration for caching behavior
Fields
| Name | Type | Description |
|---|---|---|
enabled | bool | Enable response caching |
prompt_caching | bool | Enable prompt caching (provider-specific) |
ttl_secs | Option<u64> | Cache TTL in seconds |
Methods
new
fn new() -> SelfCreate a new caching config
disabled
fn disabled(mut self) -> SelfDisable caching
with_prompt_caching
fn with_prompt_caching(mut self) -> SelfEnable prompt caching
ttl
fn ttl(mut self, secs: u64) -> SelfSet TTL
Parameters:
| Name | Type |
|---|---|
secs | u64 |
Source
View on GitHubpraisonai/src/config.rs at line 643