Struct cached::stores::UnboundCache[][src]

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

Default unbounded cache

Methods

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

Creates an empty UnboundCache

Creates an empty UnboundCache with a given pre-allocated capacity

Trait Implementations

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

Attempt to retrieve a cached value

Insert a key, value pair

Return the current cache size (number of elements)

Return the number of times a cached value was successfully retrieved

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

Return the cache capacity

Return the lifespan of cached values (time to eviction)

Auto Trait Implementations

impl<K, V> Send for UnboundCache<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for UnboundCache<K, V> where
    K: Sync,
    V: Sync