Skip to main content

Module cache

Module cache 

Source
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§

CompileCache
A cache for CompiledQuery values keyed by plan hash + dialect.
CompileCacheKey
Key used to cache compiled SQL results.
MemoryCache
A simple in-memory cache backed by a HashMap.
NoopCache
A cache that discards every inserted value.
PromptCache
A cache for system prompt strings keyed by PromptCacheKey.
PromptCacheKey
Key used to identify a cached system prompt.
SchemaCache
A cache for SchemaSnapshot values keyed by version + source.
SchemaCacheKey
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.