[−][src]Struct jupiter::lru::lru::LRUCache
Implementations
impl LRUCache
[src]
pub fn new(
capacity: usize,
max_memory: usize,
soft_ttl: Duration,
hard_ttl: Duration,
refresh_interval: Duration
) -> Self
[src]
capacity: usize,
max_memory: usize,
soft_ttl: Duration,
hard_ttl: Duration,
refresh_interval: Duration
) -> Self
pub fn put(&mut self, key: String, value: String) -> Result<()>
[src]
pub fn get(&mut self, key: &str) -> Option<(bool, bool, &str)>
[src]
pub fn remove(&mut self, key: &str)
[src]
pub fn flush(&mut self)
[src]
pub fn num_entries(&self) -> usize
[src]
pub fn capacity(&self) -> usize
[src]
pub fn set_capacity(&mut self, capacity: usize)
[src]
pub fn allocated_memory(&self) -> usize
[src]
pub fn total_allocated_memory(&self) -> usize
[src]
pub fn max_memory(&self) -> usize
[src]
pub fn set_max_memory(&mut self, max_memory: usize)
[src]
pub fn utilization(&self) -> f32
[src]
pub fn memory_utilization(&self) -> f32
[src]
pub fn hit_rate(&self) -> f32
[src]
pub fn write_read_ratio(&self) -> f32
[src]
pub fn reads(&self) -> usize
[src]
pub fn writes(&self) -> usize
[src]
pub fn soft_ttl(&self) -> Duration
[src]
pub fn set_soft_ttl(&mut self, soft_ttl: Duration)
[src]
pub fn hard_ttl(&self) -> Duration
[src]
pub fn set_hard_ttl(&mut self, hard_ttl: Duration)
[src]
pub fn refresh_interval(&self) -> Duration
[src]
pub fn set_refresh_interval(&mut self, refresh_interval: Duration)
[src]
Auto Trait Implementations
impl RefUnwindSafe for LRUCache
impl Send for LRUCache
impl Sync for LRUCache
impl Unpin for LRUCache
impl UnwindSafe for LRUCache
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,