MCPcopy Create free account
hub / github.com/ReAPI-com/mcp-openapi / set

Method set

src/core/Cache.ts:53–64  ·  view source on GitHub ↗
(key: K, value: V)

Source from the content-addressed store, hash-verified

51 }
52
53 set(key: K, value: V): void {
54 // Remove oldest entry if we're at capacity
55 if (this.cache.size >= this.maxSize) {
56 const oldestKey = this.cache.keys().next().value;
57 this.cache.delete(oldestKey);
58 }
59
60 this.cache.set(key, {
61 value,
62 timestamp: Date.now(),
63 });
64 }
65
66 get(key: K): V | undefined {
67 const entry = this.cache.get(key);

Callers 3

loadExistingCatalogMethod · 0.80
saveSpecMethod · 0.80
loadSpecMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected