Struct lru2::LRU2 [] [src]

pub struct LRU2<C: Cacheable> { /* fields omitted */ }

The two-level LRU cache


impl<C: Cacheable> Cache<C>

Create a new LRU cache of caches

cache_size specifies the number of caches in the second layer. register_size specifies the number of entries in each second-layer cache.

Set a payload beneath two keys

The cache_key is more general, and can have multiple register_keys stored under it.

Check if any payloads are set under a given cache_key, and return the number of payloads set

Get a payload set (if any) under a given set of keys