pub struct CacheConfig {
pub enabled: bool,
pub l1: L1Config,
pub l2: L2Config,
pub l3: L3Config,
pub invalidation: InvalidationConfig,
pub default_ttl: Duration,
pub max_result_size: usize,
pub table_configs: HashMap<String, TableCacheConfig>,
pub excluded_tables: Vec<String>,
}Expand description
Main cache configuration
Fields§
§enabled: boolEnable/disable cache globally
l1: L1ConfigL1 hot cache configuration
l2: L2ConfigL2 warm cache configuration
l3: L3ConfigL3 semantic cache configuration
invalidation: InvalidationConfigCache invalidation configuration
default_ttl: DurationDefault TTL for cached results
max_result_size: usizeMaximum result size to cache (bytes)
table_configs: HashMap<String, TableCacheConfig>Table-specific configurations
excluded_tables: Vec<String>Excluded tables (never cache)
Implementations§
Source§impl CacheConfig
impl CacheConfig
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
Create a configuration optimized for high-throughput reads
Sourcepub fn ai_workload() -> Self
pub fn ai_workload() -> Self
Create a configuration optimized for AI/RAG workloads
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
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
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 more