Struct cached::stores::SizedCache [] [src]

pub struct SizedCache<K, V> { /* fields omitted */ }

Least Recently Used / Sized Cache - Stores up to a specified sized before beginning to evict the least recently used keys

Methods

impl<K: Hash + Eq, V> SizedCache<K, V>
[src]

[src]

Creates a new SizedCache with a given capacity

[src]

Trait Implementations

impl<K: Hash + Eq + Clone, V> Cached<K, V> for SizedCache<K, V>
[src]

[src]

Attempt to retrieve a cached value

[src]

Insert a key, value pair

[src]

Return the current cache size (number of elements)

[src]

Return the number of times a cached value was successfully retrieved

[src]

Return the number of times a cached value was unable to be retrieved

[src]

Return the cache capacity

[src]

Return the lifespan of cached values (time to eviction)