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

Method get

src/lib/apiCache.ts:10–18  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

8 ) {}
9
10 get(key: string): T | null {
11 const entry = this.cache.get(key);
12 if (!entry) return null;
13 if (Date.now() - entry.fetchedAt > this.ttl) {
14 this.cache.delete(key);
15 return null;
16 }
17 return entry.data;
18 }
19
20 set(key: string, data: T): void {
21 this.cache.set(key, { data, fetchedAt: Date.now() });

Callers 15

isAuthorizedFunction · 0.45
getClientIPFunction · 0.45
checkRateLimitFunction · 0.45
buildCalendarFunction · 0.45
CalendarPanelFunction · 0.45
snapToGroupCentroidsFunction · 0.45
offsetColocatedFunction · 0.45
addMarketLayersFunction · 0.45
updateHoverFunction · 0.45
WorldMapInnerFunction · 0.45
OpenOrdersPanelFunction · 0.45
TopCountriesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected