Function: cachingKeySource()
cachingKeySource(
inner,marginSeconds?):KeySource
Defined in: packages/aiui-oracle/src/keys.ts:207
Cache the inner source's credential and refresh it only when its TTL is within marginSeconds of expiring. NOT for ek_-minting sources anymore: ephemeral secrets became single-use (2026-08-25, the header's revision) — a cached one fails every reconnect with ephemeral_token_already_used. Kept for credentials that genuinely remain valid across uses. Credentials with an unknown expiry (a pasted ek_) are never cached — the inner source is the truth.
Parameters
inner
marginSeconds?
number = 60