Update cache configuration
(&self, new_config: CacheConfig)
| 520 | |
| 521 | /// Update cache configuration |
| 522 | pub fn update_config(&self, new_config: CacheConfig) -> Result<(), String> { |
| 523 | new_config.validate()?; |
| 524 | |
| 525 | let old_config_str = format!("{:?}", self.config); |
| 526 | let new_config_str = format!("{:?}", new_config); |
| 527 | |
| 528 | self.record_event(CacheEvent::ConfigUpdate { |
| 529 | old_config: old_config_str, |
| 530 | new_config: new_config_str, |
| 531 | timestamp: Instant::now(), |
| 532 | }); |
| 533 | |
| 534 | // Note: In a full implementation, we'd update the actual config |
| 535 | // This would require making config fields mutable or rebuilding caches |
| 536 | |
| 537 | Ok(()) |
| 538 | } |
| 539 | |
| 540 | /// Manually invalidate cache entries by tags |
| 541 | pub fn invalidate_by_tags(&self, tags: Vec<String>, reason: String) { |
nothing calls this directly
no test coverage detected