pub struct CacheOptions {
pub cache_system_prompt: bool,
pub cache_tools: bool,
pub cache_recent_turns: usize,
pub extended_ttl: bool,
pub global_scope: bool,
}Expand description
Controls which parts of the request are eligible for prompt caching.
Fields§
§cache_system_prompt: boolCache the system prompt across requests.
cache_tools: boolCache tool definitions.
cache_recent_turns: usizeNumber of recent conversation turns to cache.
extended_ttl: boolUse 1-hour TTL instead of default 5-minute.
global_scope: boolUse global scope (shared across users with identical prompts).
Trait Implementations§
Source§impl Clone for CacheOptions
impl Clone for CacheOptions
Source§fn clone(&self) -> CacheOptions
fn clone(&self) -> CacheOptions
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 CacheOptions
impl Debug for CacheOptions
Source§impl Default for CacheOptions
impl Default for CacheOptions
Source§fn default() -> CacheOptions
fn default() -> CacheOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CacheOptions
impl RefUnwindSafe for CacheOptions
impl Send for CacheOptions
impl Sync for CacheOptions
impl Unpin for CacheOptions
impl UnsafeUnpin for CacheOptions
impl UnwindSafe for CacheOptions
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