pub struct HotCache { /* private fields */ }Expand description
High-performance hot cache
Implementations§
Source§impl HotCache
impl HotCache
Sourcepub fn new(config: CacheConfig) -> Self
pub fn new(config: CacheConfig) -> Self
Create new hot cache
Sourcepub fn get(&self, key: &str) -> Option<CacheEntry>
pub fn get(&self, key: &str) -> Option<CacheEntry>
Get entry from cache (<1μs)
Sourcepub fn remove(&self, key: &str) -> Option<CacheEntry>
pub fn remove(&self, key: &str) -> Option<CacheEntry>
Remove entry from cache
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics
Auto Trait Implementations§
impl !Freeze for HotCache
impl !RefUnwindSafe for HotCache
impl Send for HotCache
impl Sync for HotCache
impl Unpin for HotCache
impl !UnwindSafe for HotCache
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