On your example, without reading into the implementation, I'm wondering if the comment is wrong, or if the comment is telling us about a hidden default, but then what does the 2 mean.
// Create an LRU cache with a capacity of 100 entries
let mut cache = LRUKCache::new(2);
Would love to see benchmarks vs competition considering the high performance claim.
Foyer is another rust hybrid cache, and quick-cache is the fastest in-memory impl I'm aware of.
Sane defaults and easy of setting a memory limit are two other things I look for in caches.
4 comments of 8
[ 5.2 ms ] story [ 19.1 ms ] threadhttps://rust-lang.github.io/api-guidelines/naming.html#casin...
Sane defaults and easy of setting a memory limit are two other things I look for in caches.