|
1 | | -pub use crate::ds::{ |
2 | | - ClockRing, FixedHistory, FrequencyBucketEntryMeta, FrequencyBuckets, FrequencyBucketsHandle, |
3 | | - GhostList, IntrusiveList, KeyInterner, LazyMinHeap, ShardSelector, SlotArena, SlotId, |
4 | | -}; |
| 1 | +//! Convenience re-exports for the most common cachekit types. |
| 2 | +//! |
| 3 | +//! Import everything with: |
| 4 | +//! |
| 5 | +//! ``` |
| 6 | +//! use cachekit::prelude::*; |
| 7 | +//! ``` |
| 8 | +//! |
| 9 | +//! This gives you the core traits ([`CoreCache`], [`ReadOnlyCache`], |
| 10 | +//! [`MutableCache`]), the policy-specific traits, and the [`CacheBuilder`] |
| 11 | +//! entry point. Internal data structures and concrete policy types are |
| 12 | +//! available from their respective modules ([`ds`](crate::ds), |
| 13 | +//! [`policy`](crate::policy)). |
5 | 14 |
|
6 | | -#[cfg(feature = "concurrency")] |
7 | | -pub use crate::ds::{ |
8 | | - ConcurrentClockRing, ConcurrentIntrusiveList, ConcurrentSlotArena, |
9 | | - ShardedFrequencyBucketEntryMeta, ShardedFrequencyBuckets, ShardedSlotArena, ShardedSlotId, |
| 15 | +pub use crate::builder::{Cache, CacheBuilder, CachePolicy}; |
| 16 | +pub use crate::traits::{ |
| 17 | + ConcurrentCache, CoreCache, FifoCacheTrait, LfuCacheTrait, LruCacheTrait, LrukCacheTrait, |
| 18 | + MutableCache, ReadOnlyCache, |
10 | 19 | }; |
| 20 | + |
11 | 21 | #[cfg(feature = "metrics")] |
12 | 22 | pub use crate::metrics::snapshot::CacheMetricsSnapshot; |
13 | | -#[cfg(feature = "policy-fifo")] |
14 | | -pub use crate::policy::fifo::FifoCache; |
15 | | -pub use crate::traits::{ |
16 | | - AsyncCacheFuture, CacheConfig, CacheFactory, CacheTier, CacheTierManager, ConcurrentCache, |
17 | | - CoreCache, FifoCacheTrait, LfuCacheTrait, LruCacheTrait, LrukCacheTrait, MutableCache, |
18 | | - ReadOnlyCache, |
19 | | -}; |
|
0 commit comments