pub struct DistribCacheConfigBuilder { /* private fields */ }Expand description
Builder for DistribCacheConfig
Implementations§
Source§impl DistribCacheConfigBuilder
impl DistribCacheConfigBuilder
Sourcepub fn l1_size_mb(self, size: usize) -> Self
pub fn l1_size_mb(self, size: usize) -> Self
Set L1 cache size in MB
Sourcepub fn l1_max_entry_size(self, size: usize) -> Self
pub fn l1_max_entry_size(self, size: usize) -> Self
Set L1 maximum entry size
Sourcepub fn l1_eviction_policy(self, policy: EvictionPolicy) -> Self
pub fn l1_eviction_policy(self, policy: EvictionPolicy) -> Self
Set L1 eviction policy
Sourcepub fn l2_enabled(self, enabled: bool) -> Self
pub fn l2_enabled(self, enabled: bool) -> Self
Enable L2 cache
Sourcepub fn l2_size_gb(self, size: u64) -> Self
pub fn l2_size_gb(self, size: u64) -> Self
Set L2 cache size in GB
Sourcepub fn l2_compression(self, compression: CompressionType) -> Self
pub fn l2_compression(self, compression: CompressionType) -> Self
Set L2 compression type
Sourcepub fn l3_enabled(self, enabled: bool) -> Self
pub fn l3_enabled(self, enabled: bool) -> Self
Enable L3 distributed cache
Sourcepub fn l3_replication_factor(self, factor: u32) -> Self
pub fn l3_replication_factor(self, factor: u32) -> Self
Set L3 replication factor
Sourcepub fn l3_peers(self, peers: Vec<SocketAddr>) -> Self
pub fn l3_peers(self, peers: Vec<SocketAddr>) -> Self
Set L3 peer addresses
Sourcepub fn oltp_cache_ttl(self, ttl: Duration) -> Self
pub fn oltp_cache_ttl(self, ttl: Duration) -> Self
Set OLTP cache TTL
Sourcepub fn olap_cache_ttl(self, ttl: Duration) -> Self
pub fn olap_cache_ttl(self, ttl: Duration) -> Self
Set OLAP cache TTL
Sourcepub fn vector_cache_ttl(self, ttl: Duration) -> Self
pub fn vector_cache_ttl(self, ttl: Duration) -> Self
Set vector cache TTL
Sourcepub fn ai_agent_cache_ttl(self, ttl: Duration) -> Self
pub fn ai_agent_cache_ttl(self, ttl: Duration) -> Self
Set AI agent cache TTL
Sourcepub fn rag_cache_ttl(self, ttl: Duration) -> Self
pub fn rag_cache_ttl(self, ttl: Duration) -> Self
Set RAG cache TTL
Sourcepub fn prefetch_enabled(self, enabled: bool) -> Self
pub fn prefetch_enabled(self, enabled: bool) -> Self
Enable prefetching
Sourcepub fn prefetch_lookahead(self, lookahead: u32) -> Self
pub fn prefetch_lookahead(self, lookahead: u32) -> Self
Set prefetch lookahead
Sourcepub fn prefetch_confidence_threshold(self, threshold: f32) -> Self
pub fn prefetch_confidence_threshold(self, threshold: f32) -> Self
Set prefetch confidence threshold
Sourcepub fn invalidation_mode(self, mode: InvalidationMode) -> Self
pub fn invalidation_mode(self, mode: InvalidationMode) -> Self
Set invalidation mode
Sourcepub fn wal_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn wal_endpoint(self, endpoint: impl Into<String>) -> Self
Set WAL endpoint
Sourcepub fn scheduling_policy(self, policy: SchedulingPolicy) -> Self
pub fn scheduling_policy(self, policy: SchedulingPolicy) -> Self
Set scheduling policy
Sourcepub fn heatmap_enabled(self, enabled: bool) -> Self
pub fn heatmap_enabled(self, enabled: bool) -> Self
Enable heatmap analytics
Sourcepub fn max_conversation_turns(self, turns: usize) -> Self
pub fn max_conversation_turns(self, turns: usize) -> Self
Set maximum conversation turns to cache
Sourcepub fn semantic_similarity_threshold(self, threshold: f32) -> Self
pub fn semantic_similarity_threshold(self, threshold: f32) -> Self
Set semantic similarity threshold
Sourcepub fn build(self) -> DistribCacheConfig
pub fn build(self) -> DistribCacheConfig
Build the configuration
Trait Implementations§
Source§impl Debug for DistribCacheConfigBuilder
impl Debug for DistribCacheConfigBuilder
Source§impl Default for DistribCacheConfigBuilder
impl Default for DistribCacheConfigBuilder
Source§fn default() -> DistribCacheConfigBuilder
fn default() -> DistribCacheConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DistribCacheConfigBuilder
impl RefUnwindSafe for DistribCacheConfigBuilder
impl Send for DistribCacheConfigBuilder
impl Sync for DistribCacheConfigBuilder
impl Unpin for DistribCacheConfigBuilder
impl UnsafeUnpin for DistribCacheConfigBuilder
impl UnwindSafe for DistribCacheConfigBuilder
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> 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