Skip to main content

Module cache

Module cache 

Source
Expand description

Embedding cache for avoiding redundant computations.

This module provides a simple LRU cache for embeddings based on content hashes.

Re-exportsยง

use ragfs_core::EmbedError; ๐Ÿ”’
use ragfs_core::Embedder; ๐Ÿ”’
use ragfs_core::EmbeddingConfig; ๐Ÿ”’
use ragfs_core::EmbeddingOutput; ๐Ÿ”’
use ragfs_core::Modality; ๐Ÿ”’
use std::collections::HashMap; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use tokio::sync::RwLock; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’

Structsยง

CacheEntry ๐Ÿ”’
A cached embedding entry.
CacheStats
Cache statistics.
EmbeddingCache
Embedding cache with LRU eviction.

Constantsยง

DEFAULT_CACHE_SIZE ๐Ÿ”’
Maximum number of entries in the cache.