8 ms·
Show HN: Cachekit – High performance caching policies library in Rust
- carlmr 8mo agoOn 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?
- failsafe 8mo agoderp, It should be LRU instead of LRU-K.
- touisteur 8mo agoAnother time I wish rust had named parameters. For reading code without an IDE (which is a lot of the experience in discovering a library, learning, navigating in code on github...) it would be useful.
- carlmr 8mo agoI think so, too, it's beautifully designed in many ways, but this seems like an oversight.
- virtualritz 8mo agoShould be checked against official Rust API naming guidelines. LrukCache, not LRUKCache etc. https://rust-lang.github.io/api-guidelines/naming.html#casing-conforms-to-rfc-430-c-case https://rust-lang.github.io/api-guidelines/naming.html#casin...
- failsafe 8mo agoah, gad damn it. cheers though :P
- yccs27 8mo agoThanks for the link, nice to see the informal conventions spelled out like this!
- fleahunter 8mo ago[dead]
- fyrn_ 8mo agoWould 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.
- deleted 8mo ago[deleted]