Skip to main content

Module store

Module store 

Source
Expand description

LMDB-backed storage for CachedEntry values, keyed by query hash, with a reverse tag index for invalidation.

Two databases in one heed environment:

  • entries: cache key (Str) -> CachedEntry bytes (Bytes, rkyv).
  • tags: tag (Str) -> cache key (Str), DUP_SORT so one tag maps to every cache key it was recorded against — this is what makes invalidate an O(matching entries) reverse lookup instead of a full entries scan.

Structs§

Cache
CacheStats
Snapshot of a cache’s current size — see Cache::stat.

Functions§

cache_key
sha256(sql) + bound parameter values, hex-encoded — see the cache layer plan’s key-simplification note: compiled.sql is already a canonical, whitespace-insensitive form, so hashing it directly (rather than a separately normalized AST) is both simpler and precise.

Type Aliases§

Result