Clear all caches
(&self)
| 573 | |
| 574 | /// Clear all caches |
| 575 | pub fn clear_all(&self) { |
| 576 | self.result_cache.clear(); |
| 577 | self.plan_cache.clear(); |
| 578 | self.subquery_cache.clear(); |
| 579 | |
| 580 | { |
| 581 | let mut global_stats = self.global_stats.write().unwrap(); |
| 582 | *global_stats = GlobalCacheStats::default(); |
| 583 | global_stats.last_reset = Some(Instant::now()); |
| 584 | } |
| 585 | |
| 586 | self.events.write().unwrap().clear(); |
| 587 | } |
| 588 | |
| 589 | /// Get recent cache events for debugging |
| 590 | pub fn get_recent_events(&self, limit: Option<usize>) -> Vec<CacheEvent> { |
no test coverage detected