MCPcopy
hub / github.com/thesysdev/openui / invalidate

Function invalidate

packages/lang-core/src/runtime/queryManager.ts:422–439  ·  view source on GitHub ↗
(statementIds?: string[])

Source from the content-addressed store, hash-verified

420 }
421
422 function invalidate(statementIds?: string[]) {
423 if (disposed || !toolProvider) return;
424
425 const targets = statementIds?.length
426 ? statementIds.filter((sid) => queries.has(sid))
427 : [...queries.keys()];
428
429 for (const sid of targets) {
430 const q = queries.get(sid);
431 if (!q) continue;
432 const entry = cache.get(q.cacheKey);
433 if (entry?.inFlight) {
434 q.needsRefetch = true;
435 } else {
436 executeFetch(q.cacheKey, sid);
437 }
438 }
439 }
440
441 // ── Mutation methods ─────────────────────────────────────────────────────
442

Callers 1

fireMutationFunction · 0.85

Calls 3

executeFetchFunction · 0.85
hasMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected