Module calc_lib::cache

source ·
Expand description

Fixed-sized cache that automatically overwrites the oldest data when a new item is added and the cache is full. One can think of Cache as a very limited but more performant VecDeque that only adds new data or reads old data.

Structs

  • A cache of N Ts. When the cache is filled up, a new entry overwrites the oldest entry. Cache<T, N> cannot be expanded or shrunk.