pub struct L1CacheConfig {
pub max_entries: usize,
pub max_memory_bytes: u64,
pub default_ttl: u64,
pub eviction_strategy: EvictionStrategy,
pub enable_concurrent_access: bool,
pub shard_count: usize,
pub promotion_threshold: u64,
}Expand description
L1 (memory) cache configuration
Fields§
§max_entries: usizeMaximum number of entries in L1 cache
max_memory_bytes: u64Maximum memory usage in bytes
default_ttl: u64Default TTL for L1 entries (in seconds)
eviction_strategy: EvictionStrategyEviction strategy
enable_concurrent_access: boolEnable concurrent access optimization
shard_count: usizeShard count for DashMap (0 = auto-detect)
promotion_threshold: u64Promotion threshold (access count to promote from L2 to L1)
Trait Implementations§
Source§impl Clone for L1CacheConfig
impl Clone for L1CacheConfig
Source§fn clone(&self) -> L1CacheConfig
fn clone(&self) -> L1CacheConfig
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 L1CacheConfig
impl Debug for L1CacheConfig
Source§impl Default for L1CacheConfig
impl Default for L1CacheConfig
Source§impl<'de> Deserialize<'de> for L1CacheConfig
impl<'de> Deserialize<'de> for L1CacheConfig
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
Auto Trait Implementations§
impl Freeze for L1CacheConfig
impl RefUnwindSafe for L1CacheConfig
impl Send for L1CacheConfig
impl Sync for L1CacheConfig
impl Unpin for L1CacheConfig
impl UnsafeUnpin for L1CacheConfig
impl UnwindSafe for L1CacheConfig
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