#cache #persistent #number

kismet-cache

A bounded multiprocess cache of files on disk

5 releases

new 0.2.2 Jan 26, 2022
0.2.1 Oct 16, 2021
0.2.0 Oct 13, 2021
0.1.1 Oct 12, 2021
0.1.0 Oct 12, 2021
Download history 544/week @ 2021-10-12 620/week @ 2021-10-19 349/week @ 2021-10-26 446/week @ 2021-11-02 589/week @ 2021-11-09 196/week @ 2021-11-16 147/week @ 2021-11-23 173/week @ 2021-11-30 263/week @ 2021-12-07 187/week @ 2021-12-14 120/week @ 2021-12-21 205/week @ 2021-12-28 524/week @ 2022-01-04 266/week @ 2022-01-11 446/week @ 2022-01-18

1,441 downloads per month
Used in verneuil

MIT license

210KB
3.5K SLoC

Kismet: a Second Chance cache for files on disk

Crates.io docs.rs Build Status Coverage Status

Kismet implements multiprocess lock-free crash-safe and (roughly) bounded persistent caches stored in filesystem directories, with a Second Chance eviction strategy. The maintenance logic is batched and invoked at periodic jittered intervals to make sure accesses amortise to a constant number of filesystem system calls and logarithmic (in the number of cached file) time complexity, without requiring any persistent in-memory statistics. That's good for application simplicity and performance, and enables lock-freedom, but does mean that caches are expected to temporarily grow past their capacity limits, although rarely by more than a factor of 2 or 3.

Dependencies

~0.8–1.3MB
~28K SLoC