MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / calculateApiKeyHelperTTL

Function calculateApiKeyHelperTTL

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

Source from the content-addressed store, hash-verified

483 * otherwise defaults to 5 minutes
484 */
485export function calculateApiKeyHelperTTL(): number {
486 const envTtl = process.env.CLAUDE_CODE_API_KEY_HELPER_TTL_MS
487
488 if (envTtl) {
489 const parsed = parseInt(envTtl, 10)
490 if (!Number.isNaN(parsed) && parsed >= 0) {
491 return parsed
492 }
493 logForDebugging(
494 `Found CLAUDE_CODE_API_KEY_HELPER_TTL_MS env var, but it was not a valid number. Got ${envTtl}`,
495 { level: 'error' },
496 )
497 }
498
499 return DEFAULT_API_KEY_HELPER_TTL
500}
501
502// Async API key helper with sync cache for non-blocking reads.
503// Epoch bumps on clearApiKeyHelperCache() — orphaned executions check their

Callers 1

Calls 1

logForDebuggingFunction · 0.85

Tested by

no test coverage detected