7 releases

0.2.4 Apr 16, 2023
0.2.3 Apr 15, 2023
0.2.2 Jan 26, 2022
0.2.1 Oct 16, 2021
0.1.1 Oct 12, 2021

#333 in Filesystem

Download history 77/week @ 2024-01-02 169/week @ 2024-01-09 221/week @ 2024-01-16 143/week @ 2024-01-23 263/week @ 2024-01-30 105/week @ 2024-02-06 83/week @ 2024-02-13 245/week @ 2024-02-20 187/week @ 2024-02-27 102/week @ 2024-03-05 357/week @ 2024-03-12 315/week @ 2024-03-19 134/week @ 2024-03-26 93/week @ 2024-04-02 146/week @ 2024-04-09 108/week @ 2024-04-16

548 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

~3–13MB
~153K SLoC