MCPcopy Create free account
hub / github.com/backnotprop/plannotator / set

Method set

packages/shared/semantic-diff.ts:437–449  ·  view source on GitHub ↗
(cacheKey: string, rawPatch: string, response: SemanticDiffResponse)

Source from the content-addressed store, hash-verified

435 }
436
437 set(cacheKey: string, rawPatch: string, response: SemanticDiffResponse): void {
438 this.syncPatch(rawPatch);
439
440 if (!this.cache.has(cacheKey) && this.cache.size >= this.maxEntries) {
441 const oldestKey = this.cache.keys().next().value;
442 if (typeof oldestKey === "string") {
443 this.cache.delete(oldestKey);
444 }
445 }
446
447 this.cache.set(cacheKey, response);
448 this.failures.delete(cacheKey);
449 }
450
451 /**
452 * Memoize a FAILED run for a short window. Without this, every request for

Callers 15

encryptFunction · 0.45
addLineCountsFunction · 0.45
parseNumstatFunction · 0.45
setFailureMethod · 0.45
warmFileListCacheFunction · 0.45
ensureEntryMethod · 0.45
collectFunction · 0.45
detectManagedVcsFunction · 0.45
detectVcsFunction · 0.45
createWorktreePoolFunction · 0.45

Calls 3

syncPatchMethod · 0.95
hasMethod · 0.80
deleteMethod · 0.80

Tested by 1

getDocFunction · 0.36