pub struct CacheConfig {
pub ttl: Duration,
pub min_tokens: usize,
pub cache_intervals: usize,
}Expand description
Configuration for provider-side context caching.
When attached to AgentOptions, the framework
annotates cacheable prefix messages with CacheHint markers that
adapters translate to provider-specific cache control headers.
Fields§
§ttl: DurationTime-to-live for the cached prefix on the provider side.
min_tokens: usizeMinimum token count for the cached prefix; caching is suppressed when the prefix is smaller than this threshold.
cache_intervals: usizeNumber of turns between cache refreshes (Write → Read × N → Write).
Implementations§
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheConfig
impl Debug for CacheConfig
Source§impl From<&CacheConfig> for CacheConfigData
impl From<&CacheConfig> for CacheConfigData
Source§fn from(c: &CacheConfig) -> Self
fn from(c: &CacheConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more