MCPcopy Create free account
hub / github.com/codeaashu/claude-code / isMcpAuthCached

Function isMcpAuthCached

src/services/mcp/client.ts:280–287  ·  view source on GitHub ↗
(serverId: string)

Source from the content-addressed store, hash-verified

278}
279
280async function isMcpAuthCached(serverId: string): Promise<boolean> {
281 const cache = await getMcpAuthCache()
282 const entry = cache[serverId]
283 if (!entry) {
284 return false
285 }
286 return Date.now() - entry.timestamp < MCP_AUTH_CACHE_TTL_MS
287}
288
289// Serialize cache writes through a promise chain to prevent concurrent
290// read-modify-write races when multiple servers return 401 in the same batch

Callers 1

processServerFunction · 0.85

Calls 1

getMcpAuthCacheFunction · 0.85

Tested by

no test coverage detected