MCPcopy Index your code
hub / github.com/codeaashu/claude-code / calculateApiKeyHelperTTL

Function calculateApiKeyHelperTTL

src/utils/auth.ts:435–450  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

433 * otherwise defaults to 5 minutes
434 */
435export function calculateApiKeyHelperTTL(): number {
436 const envTtl = process.env.CLAUDE_CODE_API_KEY_HELPER_TTL_MS
437
438 if (envTtl) {
439 const parsed = parseInt(envTtl, 10)
440 if (!Number.isNaN(parsed) && parsed >= 0) {
441 return parsed
442 }
443 logForDebugging(
444 `Found CLAUDE_CODE_API_KEY_HELPER_TTL_MS env var, but it was not a valid number. Got ${envTtl}`,
445 { level: 'error' },
446 )
447 }
448
449 return DEFAULT_API_KEY_HELPER_TTL
450}
451
452// Async API key helper with sync cache for non-blocking reads.
453// Epoch bumps on clearApiKeyHelperCache() — orphaned executions check their

Callers 1

Calls 1

logForDebuggingFunction · 0.85

Tested by

no test coverage detected