MCPcopy Index your code
hub / github.com/simstudioai/sim / cacheCard

Function cacheCard

apps/sim/lib/a2a/client.ts:62–68  ·  view source on GitHub ↗
(agentUrl: string, card: AgentCard)

Source from the content-addressed store, hash-verified

60}
61
62function cacheCard(agentUrl: string, card: AgentCard): void {
63 if (agentCardCache.size >= CARD_CACHE_MAX_ENTRIES) {
64 const oldest = agentCardCache.keys().next().value
65 if (oldest !== undefined) agentCardCache.delete(oldest)
66 }
67 agentCardCache.set(agentUrl, { card, expiresAt: Date.now() + CARD_CACHE_TTL_MS })
68}
69
70/** Attaches the `X-API-Key` header to every outgoing request. */
71class ApiKeyInterceptor implements CallInterceptor {

Callers 1

resolveAgentCardFunction · 0.85

Calls 2

deleteMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected