pub struct CacheConfig { /* private fields */ }Expand description
Configuration for ShardedMemoryCache and CachePlugin.
Implementations§
Source§impl CacheConfig
Inherent fluent builders for CacheConfig.
impl CacheConfig
Inherent fluent builders for CacheConfig.
Sourcepub fn with_default_ttl_ms(self, ttl_ms: u64) -> Self
pub fn with_default_ttl_ms(self, ttl_ms: u64) -> Self
Sourcepub fn with_max_entries(self, max_entries: usize) -> Self
pub fn with_max_entries(self, max_entries: usize) -> Self
Sourcepub fn with_max_bytes(self, max_bytes: usize) -> Self
pub fn with_max_bytes(self, max_bytes: usize) -> Self
Source§impl CacheConfig
impl CacheConfig
pub fn get_default_ttl_ms(&self) -> u64
pub fn get_mut_default_ttl_ms(&mut self) -> &mut u64
pub fn set_default_ttl_ms(&mut self, val: u64) -> &mut Self
pub fn get_max_entries(&self) -> usize
pub fn get_mut_max_entries(&mut self) -> &mut usize
pub fn set_max_entries(&mut self, val: usize) -> &mut Self
pub fn get_max_bytes(&self) -> usize
pub fn get_mut_max_bytes(&mut self) -> &mut usize
pub fn set_max_bytes(&mut self, val: usize) -> &mut Self
pub fn get_max_entry_bytes(&self) -> usize
pub fn get_mut_max_entry_bytes(&mut self) -> &mut usize
pub fn set_max_entry_bytes(&mut self, val: usize) -> &mut Self
pub fn get_bypass_authenticated(&self) -> bool
pub fn get_mut_bypass_authenticated(&mut self) -> &mut bool
pub fn set_bypass_authenticated(&mut self, val: bool) -> &mut Self
pub fn get_emit_diagnostic_headers(&self) -> bool
pub fn get_mut_emit_diagnostic_headers(&mut self) -> &mut bool
pub fn set_emit_diagnostic_headers(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§impl Debug for CacheConfig
impl Debug for CacheConfig
Source§impl Default for CacheConfig
Default construction for CacheConfig.
impl Default for CacheConfig
Default construction for CacheConfig.
Source§fn default() -> Self
fn default() -> Self
Constructs a default CacheConfig (60 s TTL, 16 384 entries, 64 MiB total cap).
impl Eq for CacheConfig
Source§impl PartialEq for CacheConfig
impl PartialEq for CacheConfig
impl StructuralPartialEq for CacheConfig
Auto Trait Implementations§
impl Forget for CacheConfig
impl Freeze for CacheConfig
impl Move 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§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.