src/backup/dynamic_index.rs: Add LruCache for chunks.
In order to improve non-sequential reads of chunks as e.g. in FUSE. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
35ddf0b419
commit
536683e73b
@ -100,6 +100,8 @@ pub struct LruCache<K, V> {
|
||||
_marker: PhantomData<Box<CacheNode<K, V>>>,
|
||||
}
|
||||
|
||||
unsafe impl<K, V> Send for LruCache<K, V> {}
|
||||
|
||||
impl<K: std::cmp::Eq + std::hash::Hash + Copy, V> LruCache<K, V> {
|
||||
/// Create LRU cache instance which holds up to `capacity` nodes at once.
|
||||
pub fn new(capacity: usize) -> Self {
|
||||
|
Reference in New Issue
Block a user