MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / get

Method get

nodedb/src/engine/timeseries/query_cache.rs:43–47  ·  view source on GitHub ↗

Look up a cached result. Requires `tenant_id` to prevent cross-tenant leaks.

(&self, tenant_id: u64, partition_id: i64, query_hash: u64)

Source from the content-addressed store, hash-verified

41
42 /// Look up a cached result. Requires `tenant_id` to prevent cross-tenant leaks.
43 pub fn get(&self, tenant_id: u64, partition_id: i64, query_hash: u64) -> Option<&[u8]> {
44 self.entries
45 .get(&(tenant_id, partition_id, query_hash))
46 .map(|v| v.as_slice())
47 }
48
49 /// Insert a result into the cache. Evicts old entries if over budget.
50 pub fn insert(&mut self, tenant_id: u64, partition_id: i64, query_hash: u64, result: Vec<u8>) {

Callers 15

queryMethod · 0.45
read_columnFunction · 0.45
http_range_headersFunction · 0.45
gap_fill_bucketsFunction · 0.45
linear_fillFunction · 0.45
lookupMethod · 0.45
should_use_compoundMethod · 0.45
asof_join_keyedFunction · 0.45
compute_sort_orderFunction · 0.45
read_segmentFunction · 0.45

Calls 1

as_sliceMethod · 0.45

Tested by 1