Skip to main content

rskit_cache/
lib.rs

1//! Cache abstraction with local core stores and opt-in remote stores.
2//!
3//! The core crate exports [`CacheStore`], [`CacheRegistry`], [`MemoryCache`], and [`TypedStore`].
4//! Local, infrastructure-free adapters live in this crate: memory is always available,
5//! and filesystem storage is available with the `fs` feature.
6//! Remote infrastructure stores live in `contrib/` adapter crates and must be registered explicitly.
7//!
8//! No store is registered by default; construct and inject a registry at the composition boundary.
9
10#![warn(missing_docs)]
11
12/// Built-in cache adapters.
13pub mod adapters;
14/// Cache store configuration and store-specific options.
15pub mod config;
16/// Explicit store registry and config-driven selection.
17pub mod registry;
18/// Generic JSON-serialised typed store backed by a [`CacheStore`].
19pub mod typed_store;
20
21/// Compatibility exports for the original in-memory adapter module path.
22pub mod memory;
23
24#[cfg(feature = "fs")]
25pub use adapters::fs::{FileCache, FileCacheConfig, register_file_cache};
26pub use adapters::memory::{MemoryCache, register_memory};
27pub use config::{CacheConfig, MemoryConfig};
28pub use registry::{CacheRegistry, CacheStore, CacheStoreFactory};
29pub use typed_store::TypedStore;