Skip to main content

ScmHitAlias

Type Alias ScmHitAlias 

Source
pub type ScmHitAlias = ScmCacheHit;
Expand description

Alias: the cache hit/miss result type used by SemanticCacheManager.

Aliased Type§

pub enum ScmHitAlias {
    Exact {
        entry_id: u64,
    },
    Semantic {
        entry_id: u64,
        similarity: f64,
        original_query: String,
    },
    Miss,
}

Variants§

§

Exact

The query text was an exact match (same FNV-1a hash and text).

Fields

§entry_id: u64

Internal entry identifier.

§

Semantic

No exact match, but a semantically similar entry was found.

Fields

§entry_id: u64

Internal entry identifier.

§similarity: f64

Cosine similarity of the incoming query to the cached query.

§original_query: String

The original query text that produced this cached result.

§

Miss

No cached entry met the threshold.