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

Method update_config

graphlite/src/cache/cache_manager.rs:522–538  ·  view source on GitHub ↗

Update cache configuration

(&self, new_config: CacheConfig)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 2

validateMethod · 0.80
record_eventMethod · 0.80

Tested by

no test coverage detected