Skip to content

Commit

Permalink
feat: expose in-memory cache builder and cache entry (#705)
Browse files Browse the repository at this point in the history
Signed-off-by: MrCroxx <[email protected]>
  • Loading branch information
MrCroxx authored Sep 12, 2024
1 parent a9d957b commit ff588d4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions foyer/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
// 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},
event::EventListener,
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,
Expand All @@ -35,8 +37,3 @@ pub use crate::hybrid::{
writer::{HybridCacheStorageWriter, HybridCacheWriter},
};
use crate::{common, memory, storage};

/// In-memory cache.
pub type Cache<K, V, S = RandomState> = memory::Cache<K, V, S>;
/// In-memory cache builder.
pub type CacheBuilder<K, V, S> = memory::CacheBuilder<K, V, S>;

0 comments on commit ff588d4

Please sign in to comment.