MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isUsable

Function isUsable

apps/cloud/src/auth/jwks-cache.ts:283–284  ·  view source on GitHub ↗
(candidate: CacheEntry)

Source from the content-addressed store, hash-verified

281
282 const isFresh = (candidate: CacheEntry): boolean => Date.now() - candidate.fetchedAt < ttlMs;
283 const isUsable = (candidate: CacheEntry): boolean =>
284 Date.now() - candidate.fetchedAt < staleMaxMs;
285
286 const refresh = (): Promise<CacheEntry> => {
287 if (inflight) return inflight;

Callers 2

loadFromStoreFunction · 0.85
ensureFreshFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected