lfu-cache:恒定时间LFU缓存的生锈实现-源码下载

PIPI_333 2021-03-23 06:34:29
高速缓存
大致基于的恒定时间最少使用(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
...全文
30 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

13,655

社区成员

发帖
与我相关
我的任务
社区描述
CSDN 下载资源悬赏专区
其他 技术论坛(原bbs)
社区管理员
  • 下载资源悬赏专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧