Expand description

This crate provides a generic, fixed-size, N-way associative cache data structure that supports random and least recently used replacement (or your own custom algorithm).

Dive into the documentation for AssociativeCache to begin.

Re-exports

Modules

  • Constant cache capacity implementations.
  • An API for get-or-create operations on cache entries, similar to std::collections::HashMap’s entry API.
  • Various kinds of associativity and Indices implementations.
  • Various iterator implementations and type definitions for AssociativeCache.
  • Implementations of various replacement algorithms used when inserting into a full cache.

Structs

Traits

  • A constant cache capacity.
  • Given a cache key, return all the slots within the cache where its entry might be.
  • Given that we need to replace a cache entry when inserting a new one, consider each (index, entry) pair and return the index whose entry should be replaced.