pub struct AdaptiveCacheConfig {
pub similarity_threshold: f32,
pub min_threshold: f32,
pub max_threshold: f32,
pub ttl_seconds: u64,
pub max_entries: usize,
pub adaptive_enabled: bool,
}Expand description
Configuration for the adaptive cache
Fields§
§similarity_threshold: f32Base similarity threshold for cache hits (default: 0.92)
min_threshold: f32Minimum similarity threshold (floor: 0.85)
max_threshold: f32Maximum similarity threshold (ceiling: 0.98)
ttl_seconds: u64Time-to-live for cache entries (default: 5 minutes)
max_entries: usizeMaximum number of cache entries (default: 1000)
adaptive_enabled: boolEnable adaptive threshold adjustment
Trait Implementations§
Source§impl Clone for AdaptiveCacheConfig
impl Clone for AdaptiveCacheConfig
Source§fn clone(&self) -> AdaptiveCacheConfig
fn clone(&self) -> AdaptiveCacheConfig
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 AdaptiveCacheConfig
impl Debug for AdaptiveCacheConfig
Auto Trait Implementations§
impl Freeze for AdaptiveCacheConfig
impl RefUnwindSafe for AdaptiveCacheConfig
impl Send for AdaptiveCacheConfig
impl Sync for AdaptiveCacheConfig
impl Unpin for AdaptiveCacheConfig
impl UnwindSafe for AdaptiveCacheConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.