Expand description
Pluggable caching layer for VlorQl core operations.
This module defines the generic Cache trait and the key types
used to identify cached artifacts:
SchemaCacheKey— versioned schema snapshots.CompileCacheKey— compiled SQL keyed by plan hash + dialect.
§Examples
use vlorql_core::cache::{Cache, NoopCache};
let cache = NoopCache::<String, String>::new();
assert_eq!(cache.size(), 0);Structs§
- Compile
Cache - A cache for
CompiledQueryvalues keyed by plan hash + dialect. - Compile
Cache Key - Key used to cache compiled SQL results.
- Memory
Cache - A simple in-memory cache backed by a
HashMap. - Noop
Cache - A cache that discards every inserted value.
- Prompt
Cache - A cache for system prompt strings keyed by
PromptCacheKey. - Prompt
Cache Key - Key used to identify a cached system prompt.
- Schema
Cache - A cache for
SchemaSnapshotvalues keyed by version + source. - Schema
Cache Key - Key used to cache schema snapshots by version and source.
Traits§
- Cache
- A generic key-value cache with thread-safe operations.
Functions§
- normalize_
plan - Serialises a validated plan into a canonical JSON string suitable for hashing.