MCPcopy Create free account
hub / github.com/anus-dev/ANUS / set

Method set

packages/core/src/utils/LruCache.ts:27–37  ·  view source on GitHub ↗
(key: K, value: V)

Source from the content-addressed store, hash-verified

25 }
26
27 set(key: K, value: V): void {
28 if (this.cache.has(key)) {
29 this.cache.delete(key);
30 } else if (this.cache.size >= this.maxSize) {
31 const firstKey = this.cache.keys().next().value;
32 if (firstKey !== undefined) {
33 this.cache.delete(firstKey);
34 }
35 }
36 this.cache.set(key, value);
37 }
38
39 clear(): void {
40 this.cache.clear();

Callers 15

registerToolMethod · 0.45
updateMCPServerStatusFunction · 0.45
connectToMcpServerFunction · 0.45
walkFunction · 0.45
getMethod · 0.45
ensureCorrectEditFunction · 0.45
ensureCorrectFileContentFunction · 0.45
updateMethod · 0.45
openDiffMethod · 0.45
truncateAndUpdateMethod · 0.45
loadTokensMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected