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

时间:2021-03-21 05:15:11
【文件属性】:
文件名称:lfu-cache:恒定时间LFU缓存的生锈实现
文件大小:15KB
文件格式:ZIP
更新时间:2021-03-21 05:15:11
Rust 高速缓存 大致基于的恒定时间最少使用(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
【文件预览】:
lfu-cache-master
----LICENSE-MIT(1KB)
----LICENSE-APACHE(10KB)
----.github()
--------workflows()
----src()
--------lib.rs(29KB)
----Cargo.toml(568B)
----benches()
--------scaling.rs(1KB)
----.gitignore(19B)
----README.md(3KB)

网友评论