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

Function getCachedOverageCreditGrant

src/services/api/overageCreditGrant.ts:48–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 * refreshOverageCreditGrantCache fires lazily to populate it.
47 */
48export function getCachedOverageCreditGrant(): OverageCreditGrantInfo | null {
49 const orgId = getOauthAccountInfo()?.organizationUuid
50 if (!orgId) return null
51 const cached = getGlobalConfig().overageCreditGrantCache?.[orgId]
52 if (!cached) return null
53 if (Date.now() - cached.timestamp > CACHE_TTL_MS) return null
54 return cached.info
55}
56
57/**
58 * Drop the current org's cached entry so the next read refetches.

Callers 5

OverageCreditUpsellFunction · 0.85
createOverageCreditFeedFunction · 0.85
tipRegistry.tsFile · 0.85

Calls 2

getGlobalConfigFunction · 0.85
getOauthAccountInfoFunction · 0.50

Tested by

no test coverage detected