Show HN: Cachekit – High performance caching policies library in Rust
1–10 of 11 posts
Re: Show HN: Cachekit – High performance caching policies library in Rust
#2 // Create an LRU cache with a capacity of 100 entries
let mut cache = LRUKCache::new(2);
Why 100? Why not 2?Re: Show HN: Cachekit – High performance caching policies library in Rust
#3On 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); Why 100? Why not 2?
Re: Show HN: Cachekit – High performance caching policies library in Rust
#4https://rust-lang.github.io/api-guidelines/naming.html#casin...
Re: Show HN: Cachekit – High performance caching policies library in Rust
#5Sane defaults and easy of setting a memory limit are two other things I look for in caches.
Re: Show HN: Cachekit – High performance caching policies library in Rust
#6Should be checked against official Rust API naming guidelines. LrukCache, not LRUKCache etc. https://rust-lang.github.io/api-guidelines/naming.html#casin...
Re: Show HN: Cachekit – High performance caching policies library in Rust
#7Should be checked against official Rust API naming guidelines. LrukCache, not LRUKCache etc. https://rust-lang.github.io/api-guidelines/naming.html#casin...
Re: Show HN: Cachekit – High performance caching policies library in Rust
#8On 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); Why 100? Why not 2?