Remix.run Logo
Show HN: Cachekit – High performance caching policies library in Rust(github.com)
27 points by failsafe 5 hours ago | 1 comments
carlmr 18 minutes ago | parent [-]

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);

Why 100? Why not 2?