pub struct L1Cache { /* private fields */ }Expand description
L1 in-memory cache with LRU eviction policy
Implementations§
Source§impl L1Cache
impl L1Cache
Sourcepub fn get(&self, namespace: &str, key: &str, env: &str) -> Result<ConfigEntry>
pub fn get(&self, namespace: &str, key: &str, env: &str) -> Result<ConfigEntry>
Get an entry from the cache
Sourcepub fn put(&self, entry: ConfigEntry) -> Result<()>
pub fn put(&self, entry: ConfigEntry) -> Result<()>
Put an entry into the cache
Sourcepub fn invalidate(&self, namespace: &str, key: &str, env: &str)
pub fn invalidate(&self, namespace: &str, key: &str, env: &str)
Invalidate a specific entry
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics
Auto Trait Implementations§
impl Freeze for L1Cache
impl RefUnwindSafe for L1Cache
impl Send for L1Cache
impl Sync for L1Cache
impl Unpin for L1Cache
impl UnwindSafe for L1Cache
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