(&self)
| 60 | |
| 61 | impl 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() |
no test coverage detected