vlorql_core/cache/mod.rs
1//! Pluggable caching layer for VlorQl core operations.
2//!
3//! This module defines the generic [`Cache`] trait and the key types
4//! used to identify cached artifacts:
5//!
6//! * `SchemaCacheKey` — versioned schema snapshots.
7//! * `CompileCacheKey` — compiled SQL keyed by plan hash + dialect.
8//!
9//! # Examples
10//!
11//! ```
12//! use vlorql_core::cache::{Cache, NoopCache};
13//!
14//! let cache = NoopCache::<String, String>::new();
15//! assert_eq!(cache.size(), 0);
16//! ```
17
18mod compile_cache;
19mod key;
20mod normalize;
21mod prompt_cache;
22mod schema_cache;
23mod traits;
24
25pub use compile_cache::CompileCache;
26pub use key::{CompileCacheKey, SchemaCacheKey};
27pub use normalize::normalize_plan;
28pub(crate) use prompt_cache::hash_policy;
29pub use prompt_cache::{PromptCache, PromptCacheKey};
30pub use schema_cache::SchemaCache;
31pub use traits::{Cache, MemoryCache, NoopCache};