From ff588d4eb1a3ac247e9204b41f69b211d8925776 Mon Sep 17 00:00:00 2001 From: Croxx Date: Thu, 12 Sep 2024 12:40:47 +0800 Subject: [PATCH] feat: expose in-memory cache builder and cache entry (#705) Signed-off-by: MrCroxx --- foyer/src/prelude.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/foyer/src/prelude.rs b/foyer/src/prelude.rs index a3a6cd67..fd470ffd 100644 --- a/foyer/src/prelude.rs +++ b/foyer/src/prelude.rs @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use ahash::RandomState; pub use common::{ buf::{BufExt, BufMutExt}, code::{Key, StorageKey, StorageValue, Value}, @@ -20,7 +19,10 @@ pub use common::{ range::RangeBoundsExt, tracing::TracingConfig, }; -pub use memory::{CacheContext, EvictionConfig, FetchState, FifoConfig, LfuConfig, LruConfig, S3FifoConfig, Weighter}; +pub use memory::{ + Cache, CacheBuilder, CacheContext, CacheEntry, EvictionConfig, FetchState, FifoConfig, LfuConfig, LruConfig, + S3FifoConfig, Weighter, +}; pub use storage::{ AdmissionPicker, AdmitAllPicker, Compression, Dev, DevExt, DevOptions, DeviceStats, DirectFileDevice, DirectFileDeviceOptions, DirectFileDeviceOptionsBuilder, DirectFsDevice, DirectFsDeviceOptions, @@ -35,8 +37,3 @@ pub use crate::hybrid::{ writer::{HybridCacheStorageWriter, HybridCacheWriter}, }; use crate::{common, memory, storage}; - -/// In-memory cache. -pub type Cache = memory::Cache; -/// In-memory cache builder. -pub type CacheBuilder = memory::CacheBuilder;