Struct multicache::MultiCache[][src]

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

Methods

impl<K, V> MultiCache<K, V>
[src]

Create a new cache which will at most hold a total of bytesize in elements

Add a new element by key/value with a given bytesize, if after inserting this element we would be going over the bytesize of the cache first enough elements are evicted for that to not be the case

Add a new element by key/Arc with a given bytesize, if after inserting this element we would be going over the bytesize of the cache first enough elements are evicted for that to not be the case

Get an element from the cache, updating it so it's now the most recently used and thus the last to be evicted

Check if a given key exists in the cache

Trait Implementations

impl<K: Debug, V: Debug> Debug for MultiCache<K, V>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<K, V> Send for MultiCache<K, V> where
    K: Send,
    V: Send + Sync

impl<K, V> Sync for MultiCache<K, V> where
    K: Send,
    V: Send + Sync