0.1.1 |
|
---|---|
0.1.0 |
|
#16 in #recently
44KB
857 lines
TLRU - Time aware Least Recently Used cache
This crate provides two caches:
FixedCapacity
which is a TLRU cache, with fixed capacity and lifetimeFlexibleCapacity
which is a cache where entries are evicted after a certain time.
WARNING - Here be dragons
- Highly experimental, use at your own risk.
- API subject to change.
lib.rs
:
TLRU implements a Time-aware Least Recently Used cache.
TLRU is a cache algorithm that, if full, evicts the entry that was accessed least recently. In TLRU, cache entries have a finite lifetime, meaning even if the cache is not full, entries can get evicted. In this implementation, accessing a cache entry does not modify its lifetime.