Module cache

Module 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ยง

Cache
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.