高速缓存
大致基于的恒定时间最少使用(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 evicted, in case additional
// bookkeeping is necessary for the value to be dropped.
let maybe_evicted = cache. insert ( "baz" , 5 );
// In the case of a t
相关下载链接:
//download.csdn.net/download/weixin_42126865/16003539?utm_source=bbsseo