Skip to main content

ScmEntryAlias

Type Alias ScmEntryAlias 

Source
pub type ScmEntryAlias = ScmCacheEntry;
Expand description

Alias: the cache entry type used by SemanticCacheManager.

Aliased Type§

pub struct ScmEntryAlias {
    pub key: ScmCacheKey,
    pub result: Vec<u8>,
    pub inserted_at: u64,
    pub last_accessed: u64,
    pub access_count: u64,
    pub ttl_us: Option<u64>,
    pub similarity_score: f64,
}

Fields§

§key: ScmCacheKey

The cache key (query text + embedding + hash).

§result: Vec<u8>

Serialised result payload.

§inserted_at: u64

Microsecond timestamp when this entry was inserted (caller-supplied).

§last_accessed: u64

Microsecond timestamp of the last access (updated on every hit).

§access_count: u64

How many times this entry has been accessed (hits).

§ttl_us: Option<u64>

Optional TTL in microseconds from inserted_at; None = immortal.

§similarity_score: f64

Similarity of the original query to itself — always 1.0 at insertion.