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

Method size_bytes

graphlite/src/cache/plan_cache.rs:62–72  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

60
61impl CacheValue for PlanCacheEntry {
62 fn size_bytes(&self) -> usize {
63 // Rough estimate - in practice would need serialization
64 let base_size = std::mem::size_of::<Self>();
65 let trace_size = self
66 .trace
67 .as_ref()
68 .map(|t| t.steps.len() * 100) // Rough estimate
69 .unwrap_or(0);
70
71 base_size + trace_size + 1024 // Plan structure overhead
72 }
73
74 fn is_valid(&self) -> bool {
75 !self.metadata.is_expired()

Callers 4

getMethod · 0.45
insertMethod · 0.45
evict_if_neededMethod · 0.45
invalidate_by_schemaMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected