Struct ethcore_util::cache::MemoryLruCache [] [src]

pub struct MemoryLruCache<K: Eq + Hash, V: HeapSizeOf> { /* fields omitted */ }

An LRU-cache which operates on memory used.

Methods

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

Create a new cache with a maximum size in bytes.

Insert an item.

Get a reference to an item in the cache. It is a logic error for its heap size to be altered while borrowed.

Currently-used size of values in bytes.