pub struct CacheSettings {
pub retention: String,
}Expand description
Cache settings for API-level prompt caching.
Fields§
§retention: StringCache retention policy.
- “none”: Disable caching
- “short”: Default retention (5 min for Anthropic, in-memory for OpenAI)
- “long”: Extended retention (1h for Anthropic, 24h for OpenAI)
Implementations§
Source§impl CacheSettings
impl CacheSettings
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if caching is enabled.
Sourcepub fn is_long_retention(&self) -> bool
pub fn is_long_retention(&self) -> bool
Check if long retention is enabled.
Trait Implementations§
Source§impl Clone for CacheSettings
impl Clone for CacheSettings
Source§fn clone(&self) -> CacheSettings
fn clone(&self) -> CacheSettings
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 CacheSettings
impl Debug for CacheSettings
Source§impl Default for CacheSettings
impl Default for CacheSettings
Source§impl<'de> Deserialize<'de> for CacheSettings
impl<'de> Deserialize<'de> for CacheSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CacheSettings
impl PartialEq for CacheSettings
impl StructuralPartialEq for CacheSettings
Auto Trait Implementations§
impl Freeze for CacheSettings
impl RefUnwindSafe for CacheSettings
impl Send for CacheSettings
impl Sync for CacheSettings
impl Unpin for CacheSettings
impl UnsafeUnpin for CacheSettings
impl UnwindSafe for CacheSettings
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