pub trait BlobCache: Clone {
// Required methods
fn insert(&self, vlog_id: u64, vhandle: &ValueHandle, value: Slice);
fn get(&self, vlog_id: u64, vhandle: &ValueHandle) -> Option<Slice>;
}
Expand description
Blob cache, in which blobs are cached in-memory after being retrieved from disk
This speeds up consecutive accesses to the same blobs, improving read performance for hot data.
Required Methods§
Sourcefn insert(&self, vlog_id: u64, vhandle: &ValueHandle, value: Slice)
fn insert(&self, vlog_id: u64, vhandle: &ValueHandle, value: Slice)
Caches a blob.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.