Skip to content

Commit 24915fb

Browse files
authored
docs: update example usage in HeapLfuCache and correct LRU-K documentation (#78)
Modified the example usage in the `HeapLfuCache` documentation to reflect the correct module path. Updated the LRU-K documentation to improve clarity by correcting the representation of segmented LRU lists. These changes enhance the overall consistency and usability of the documentation, ensuring it aligns with Rust API guidelines.
1 parent 9eddf76 commit 24915fb

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/policy/heap_lfu.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,9 @@
180180
//! ## Example Usage
181181
//!
182182
//! ```rust,ignore
183-
//! use crate::storage::disk::async_disk::cache::heap_lfu::HeapLfuCache;
183+
//! use cachekit::policy::heap_lfu::HeapLfuCache;
184184
//! use std::sync::Arc;
185-
//! use crate::storage::disk::async_disk::cache::cache_traits::{
186-
//! CoreCache, MutableCache, LfuCacheTrait,
187-
//! };
185+
//! use cachekit::traits::{CoreCache, MutableCache, LfuCacheTrait};
188186
//!
189187
//! // Create cache
190188
//! let mut cache: HeapLfuCache<String, i32> = HeapLfuCache::new(100);

src/policy/lru_k.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
//! |------------------|----------------------------------------------------|
113113
//! | `LrukCache<K,V>` | Main cache struct with store + K value |
114114
//! | `index` | `HashMap<K, usize>` to slot indices |
115-
//! | `cold`/`hot` | Segmented LRU lists (&lt;K and >=K accesses) |
115+
//! | `cold`/`hot` | Segmented LRU lists (>K and K accesses) |
116116
//! | `store` | Stores key -> `Arc<V>` ownership |
117117
//! | `k` | Number of accesses to track (default: 2) |
118118
//!

0 commit comments

Comments
 (0)