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

Method constructor

src/core/Cache.ts:19–26  ·  view source on GitHub ↗
(options: CacheOptions = {})

Source from the content-addressed store, hash-verified

17 private cleanupInterval: number;
18
19 constructor(options: CacheOptions = {}) {
20 this.cache = new Map();
21 this.maxSize = options.maxSize || 500;
22 this.ttl = options.ttl || 60 * 60 * 1000; // 1 hour default
23 this.cleanupInterval = options.cleanupInterval || 5 * 60 * 1000; // 5 minutes default
24 this.cleanupTimer = null;
25 this.startCleanupTimer();
26 }
27
28 private startCleanupTimer(): void {
29 if (this.cleanupTimer) {

Callers

nothing calls this directly

Calls 1

startCleanupTimerMethod · 0.95

Tested by

no test coverage detected