Skip to content

Commit 3f3d7a4

Browse files
committed
refactor: rename ARCCore to ArcCore for consistency
Updated references in documentation and code to rename `ARCCore` to `ArcCore`, enhancing clarity and consistency across the API. Adjusted example usage to reflect the new naming convention, ensuring users have a unified experience when interacting with the ARC cache policy.
1 parent fb4ccc2 commit 3f3d7a4

3 files changed

Lines changed: 456 additions & 79 deletions

File tree

docs/policies/arc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ depending on the workload's characteristics.
6464
## Example Usage
6565

6666
```rust
67-
use cachekit::policy::arc::ARCCore;
67+
use cachekit::policy::arc::ArcCore;
6868
use cachekit::traits::CoreCache;
6969

7070
// Create ARC cache with 100 entry capacity
71-
let mut cache = ARCCore::new(100);
71+
let mut cache = ArcCore::new(100);
7272

7373
// Insert items (go to T1 - recent list)
7474
cache.insert("page1", "content1");

src/builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
//! │ ├─── CachePolicy::HeapLfu ─► HeapLfuCache<K, V> │
2323
//! │ ├─── CachePolicy::TwoQ ────► TwoQCore<K, V> │
2424
//! │ ├─── CachePolicy::S3Fifo ──► S3FifoCache<K, V> │
25-
//! │ ├─── CachePolicy::Arc ─────► ARCCore<K, V> │
25+
//! │ ├─── CachePolicy::Arc ─────► ArcCore<K, V> │
2626
//! │ ├─── CachePolicy::Lifo ────► LifoCore<K, V> │
2727
//! │ ├─── CachePolicy::Mfu ─────► MfuCore<K, V> │
2828
//! │ ├─── CachePolicy::Mru ─────► MruCore<K, V> │
@@ -108,7 +108,7 @@ use std::sync::Arc;
108108
#[cfg(feature = "policy-lfu")]
109109
use crate::ds::frequency_buckets::DEFAULT_BUCKET_PREALLOC;
110110
#[cfg(feature = "policy-arc")]
111-
use crate::policy::arc::ARCCore;
111+
use crate::policy::arc::ArcCore;
112112
#[cfg(feature = "policy-clock")]
113113
use crate::policy::clock::ClockCache;
114114
#[cfg(feature = "policy-clock-pro")]
@@ -445,7 +445,7 @@ where
445445
#[cfg(feature = "policy-s3-fifo")]
446446
S3Fifo(S3FifoCache<K, V>),
447447
#[cfg(feature = "policy-arc")]
448-
Arc(ARCCore<K, V>),
448+
Arc(ArcCore<K, V>),
449449
#[cfg(feature = "policy-lifo")]
450450
Lifo(LifoCore<K, V>),
451451
#[cfg(feature = "policy-mfu")]
@@ -972,7 +972,7 @@ impl CacheBuilder {
972972
ghost_ratio,
973973
)),
974974
#[cfg(feature = "policy-arc")]
975-
CachePolicy::Arc => CacheInner::Arc(ARCCore::new(self.capacity)),
975+
CachePolicy::Arc => CacheInner::Arc(ArcCore::new(self.capacity)),
976976
#[cfg(feature = "policy-lifo")]
977977
CachePolicy::Lifo => CacheInner::Lifo(LifoCore::new(self.capacity)),
978978
#[cfg(feature = "policy-mfu")]

0 commit comments

Comments
 (0)