apif-twoq-cache 0.1.0

TwoQ adaptive cache — scan-resistant hot/cold cache
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# twoq-cache

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

## Usage

```rust
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.