MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / constructor

Method constructor

src/lib/apiCache.ts:5–8  ·  view source on GitHub ↗
(
    private ttl: number,
    private maxEntries = 200
  )

Source from the content-addressed store, hash-verified

3 private cache = new Map<string, { data: T; fetchedAt: number }>();
4
5 constructor(
6 private ttl: number,
7 private maxEntries = 200
8 ) {}
9
10 get(key: string): T | null {
11 const entry = this.cache.get(key);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected