高速缓存
大致基于的恒定时间最少使用(LFU)高速缓存的简单实现。
例子
use lfu_cache :: LfuCache;
let mut cache = LfuCache :: with_capacity ( 2 );
// Fill up the cache.
cache. insert ( "foo" , 3 );
cache. insert ( "bar" , 4 );
// Insert returns the evicted value, if a value was evict