MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / invalidate_trace_cache

Method invalidate_trace_cache

crates/flowtrace-cli/src/serve/state.rs:77–84  ·  view source on GitHub ↗

Invalidate the trace cache. Call after any trace.json mutation or scope change so the next read picks up the new state immediately. Also drops the run_index — traces could have been added/removed.

(&self)

Source from the content-addressed store, hash-verified

75 /// scope change so the next read picks up the new state immediately.
76 /// Also drops the run_index — traces could have been added/removed.
77 pub fn invalidate_trace_cache(&self) {
78 if let Ok(mut guard) = self.trace_cache.lock() {
79 *guard = None;
80 }
81 if let Ok(mut idx) = self.run_index.lock() {
82 idx.clear();
83 }
84 }
85
86 pub fn add_scope(&self, scope: &Path) -> Result<PathBuf> {
87 let canon = scope

Callers 3

add_scopeMethod · 0.80
write_traceFunction · 0.80
removeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected