pub struct CacheConfig {
pub l1_size: usize,
pub l2_size: usize,
pub ttl: Duration,
pub enable_prediction: bool,
pub max_memory_bytes: usize,
}
Expand description
缓存配置
Fields§
§l1_size: usize
L1缓存大小
l2_size: usize
L2缓存大小
ttl: Duration
TTL时间
enable_prediction: bool
启用预测性缓存
max_memory_bytes: usize
最大内存使用(字节)
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 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