Expand description
Write-behind (write-back) cache with dirty tracking and flush.
This module provides a cache that batches writes and lazily flushes dirty
entries to a backing store. Entries are marked dirty on insert/update;
the caller periodically calls WriteBehindCache::flush (or
flush_if_needed) to persist dirty entries.
The backing store is abstracted via the BackingStore trait so the same
cache can sit in front of an in-memory map, a file, or a network service.
Structs§
- Write
Behind Cache - Write-behind cache that defers writes to a
BackingStoreuntilflushis called. - Write
Behind Stats - Snapshot of write-behind cache statistics.
Enums§
- Write
Behind Error - Errors that can occur during write-behind cache operations.
Traits§
- Backing
Store - Abstraction over the origin data store that the cache sits in front of.