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

NameTypeDescription
enabledboolEnable response caching
prompt_cachingboolEnable prompt caching (provider-specific)
ttl_secsOption<u64>Cache TTL in seconds

Methods

new

rust
fn new() -> Self

Create a new caching config

disabled

rust
fn disabled(mut self) -> Self

Disable caching

with_prompt_caching

rust
fn with_prompt_caching(mut self) -> Self

Enable prompt caching

ttl

rust
fn ttl(mut self, secs: u64) -> Self

Set TTL

Parameters:

NameType
secsu64

Source

View on GitHub

praisonai/src/config.rs at line 643


Related Documentation