MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / create_subquery_cache_key

Function create_subquery_cache_key

graphlite/src/cache/subquery_cache.rs:696–713  ·  view source on GitHub ↗

Helper to create subquery cache key

(
    subquery_ast: &str, // Normalized subquery string
    outer_variables: Vec<(String, Value)>,
    graph_version: u64,
    schema_version: u64,
    subquery_type: SubqueryType,
)

Source from the content-addressed store, hash-verified

694
695/// Helper to create subquery cache key
696pub fn create_subquery_cache_key(
697 subquery_ast: &str, // Normalized subquery string
698 outer_variables: Vec<(String, Value)>,
699 graph_version: u64,
700 schema_version: u64,
701 subquery_type: SubqueryType,
702) -> SubqueryCacheKey {
703 let mut hasher = DefaultHasher::new();
704 subquery_ast.hash(&mut hasher);
705
706 SubqueryCacheKey {
707 subquery_hash: hasher.finish(),
708 outer_variables,
709 graph_version,
710 schema_version,
711 subquery_type,
712 }
713}
714
715/// Cache hit information for subquery results
716#[derive(Debug, Clone)]

Callers 2

get_subquery_resultMethod · 0.85
cache_subquery_resultMethod · 0.85

Calls 1

hashMethod · 0.45

Tested by

no test coverage detected