apif-twoq-cache 0.1.0

TwoQ adaptive cache — scan-resistant hot/cold cache
Documentation
  • Coverage
  • 0%
    0 out of 11 items documented0 out of 10 items with examples
  • Size
  • Source code size: 8.56 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 319.34 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • gripmock/grpctestify-rust
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rez1dent3

twoq-cache

TwoQ adaptive cache — scan-resistant hot/cold cache with promotion.

Usage

use twoq_cache::TwoQCache;

let mut cache = TwoQCache::new(2, 4);
cache.insert("key", 42);
assert_eq!(cache.get(&"key"), Some(&42));

How it works

  • Cold: entries are inserted here first. Evicted if cold exceeds limit.
  • Hot: entries promoted from cold when accessed. Protected from scan-style access patterns.