MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / get

Method get

server/src/addie/home/cache.ts:31–41  ·  view source on GitHub ↗

* Get cached content if still valid

(userId: string)

Source from the content-addressed store, hash-verified

29 * Get cached content if still valid
30 */
31 get(userId: string): HomeContent | null {
32 const entry = this.cache.get(userId);
33 if (!entry) return null;
34
35 if (Date.now() > entry.expiresAt) {
36 this.cache.delete(userId);
37 return null;
38 }
39
40 return entry.data;
41 }
42
43 /**
44 * Cache content for a user

Callers 15

sendNewsletterFunction · 0.45
getNewsletterFunction · 0.45
getNewsletterOrThrowFunction · 0.45
initPostHogErrorTrackingFunction · 0.45
safeFetchFunction · 0.45
shouldAlertFunction · 0.45
incrementMethod · 0.45
decrementMethod · 0.45
flushMethod · 0.45
warnOncePerSessionFunction · 0.45
checkPlatformBanFunction · 0.45

Calls 2

nowMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected