Skip to main content

Crate embedcache_core

Crate embedcache_core 

Source
Expand description

Pure-Rust core for embedcache: a content-addressed embedding cache backed by an embedded redb KV store.

  • Key. A 32-byte blake3 hash of (model_name, 0x00, text). The null separator prevents (model="a", text="bc") from colliding with (model="ab", text="c").
  • Value. [u64 inserted_at_secs LE][u32 dim LE][dim x f32 LE].
  • TTL. Optional. Evaluated on get; expired entries are returned as None and removed by purge_expired.

Structs§

Cache
On-disk content-addressed embedding cache.
CacheStats
Cache stats returned by Cache::stats.

Enums§

CacheError
All errors surfaced by embedcache-core.

Type Aliases§

Result
Crate-wide result alias.