Expand description
ARCache - A concurrently readable adaptive replacement cache.
An ARCache is used in place of a RwLock<LruCache>
or Mutex<LruCache>
.
This structure is transactional, meaning that readers have guaranteed
point-in-time views of the cache and their items, while allowing writers
to proceed with inclusions and cache state management in parallel.
This means that unlike a RwLock
which can have many readers OR one writer
this cache is capable of many readers, over multiple data generations AND
writers that are serialised. This formally means that this is an ACID
compliant Cache.
Modules§
- Stats collection for ARCache
Structs§
- A concurrently readable adaptive replacement cache. Operations are performed on the cache via read and write operations.
- A configurable builder to create new concurrent Adaptive Replacement Caches.
- An active read transaction over the cache. The data is this cache is guaranteed to be valid at the point in time the read is created. You may include items during a cache miss via the “insert” function.
- An active write transaction over the cache. The data in this cache is isolated from readers, and may be rolled-back if an error occurs. Changes only become globally visible once you call “commit”. Items may be added to the cache on a miss via “insert”, and you can explicitly remove items by calling “remove”.