pub struct CachePolicy {
pub response_cache_enabled: bool,
pub protect_prompt_prefix: bool,
}Expand description
Policy knobs controlling both response caching and provider prompt-cache layout protection.
Both flags default to false (no caching / no protection) so the harness
is safe-by-default and opts must be explicit.
Fields§
§response_cache_enabled: boolWhen true, the harness will look up (and write) local response cache
entries via ResponseCache before calling the provider.
protect_prompt_prefix: boolWhen true, middleware must preserve the order and content of cacheable
prefix segments. Violations are reported as CacheLayoutEvents.
Trait Implementations§
Source§impl Clone for CachePolicy
impl Clone for CachePolicy
Source§fn clone(&self) -> CachePolicy
fn clone(&self) -> CachePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CachePolicy
impl Debug for CachePolicy
Source§impl Default for CachePolicy
impl Default for CachePolicy
Source§fn default() -> CachePolicy
fn default() -> CachePolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CachePolicy
impl<'de> Deserialize<'de> for CachePolicy
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
impl Eq for CachePolicy
Source§impl PartialEq for CachePolicy
impl PartialEq for CachePolicy
Source§impl Serialize for CachePolicy
impl Serialize for CachePolicy
impl StructuralPartialEq for CachePolicy
Auto Trait Implementations§
impl Freeze for CachePolicy
impl RefUnwindSafe for CachePolicy
impl Send for CachePolicy
impl Sync for CachePolicy
impl Unpin for CachePolicy
impl UnsafeUnpin for CachePolicy
impl UnwindSafe for CachePolicy
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