pub struct MemoryCacheConfig {
pub max_capacity: u64,
pub time_to_live: Option<Duration>,
pub time_to_idle: Option<Duration>,
pub per_entry_ttl: bool,
pub enable_tags: bool,
}Expand description
Configuration for the in-memory cache.
Fields§
§max_capacity: u64Maximum number of entries.
time_to_live: Option<Duration>Default time-to-live for entries.
time_to_idle: Option<Duration>Time-to-idle (evict if not accessed).
per_entry_ttl: boolEnable entry-level TTL tracking.
Enable tag-based invalidation.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryCacheConfig
impl Clone for MemoryCacheConfig
Source§fn clone(&self) -> MemoryCacheConfig
fn clone(&self) -> MemoryCacheConfig
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 MemoryCacheConfig
impl Debug for MemoryCacheConfig
Auto Trait Implementations§
impl Freeze for MemoryCacheConfig
impl RefUnwindSafe for MemoryCacheConfig
impl Send for MemoryCacheConfig
impl Sync for MemoryCacheConfig
impl Unpin for MemoryCacheConfig
impl UnwindSafe for MemoryCacheConfig
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