MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / set

Method set

src/resolution/lru-cache.ts:46–57  ·  view source on GitHub ↗
(key: K, value: V)

Source from the content-addressed store, hash-verified

44 }
45
46 set(key: K, value: V): void {
47 if (this.store.has(key)) {
48 this.store.delete(key);
49 } else if (this.store.size >= this.max) {
50 // Evict the oldest entry — first key in iteration order.
51 const oldest = this.store.keys().next().value;
52 if (oldest !== undefined) {
53 this.store.delete(oldest);
54 }
55 }
56 this.store.set(key, value);
57 }
58
59 clear(): void {
60 this.store.clear();

Callers 15

getSegmentMatchesMethod · 0.45
loadParsedConfigFunction · 0.45
feedMethod · 0.45
syncMethod · 0.45
getChangedFilesMethod · 0.45
spawnOneMethod · 0.45
dispatchMethod · 0.45
loadGrammarsForLanguagesFunction · 0.45
getParserFunction · 0.45
drainMethod · 0.45
parse-worker.tsFile · 0.45

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected