/** * @file TtlCache singleton for github/refs. Split out of `github/refs.ts` for * size hygiene. Owns the lazy `githubCache` slot, the accessor * (`getGithubCache`), and the in-memory-only clear (`clearRefCache`). Caching * strategy: * * - In-memory cache (Map) for immediate lookups * - Persistent disk cache (cacache) for durability across runs * - Default TTL: 5 minutes * - Disable everything with the `DISABLE_GITHUB_CACHE` env var */ import type { TtlCache } from '../cache/ttl/types.js'; /** * Clear the in-memory ref resolution cache. Clears the memoization cache * without affecting the persistent disk cache. Useful for testing or when you * need fresh data from the API. * * Note: This only clears the in-memory cache. The persistent cacache storage * remains intact and will be used to rebuild the in-memory cache on next * access. * * @example * ;```ts * // Clear cache to force fresh API calls * await clearRefCache() * const sha = await resolveRefToSha('owner', 'repo', 'main') * // This will hit the persistent cache or API, not in-memory cache * ``` * * @returns Promise that resolves when cache is cleared */ export declare function clearRefCache(): Promise; /** * Get or create the GitHub cache instance. Lazy initializes the cache with * default TTL and memoization enabled. Used internally for caching GitHub API * responses. * * @returns The singleton cache instance */ export declare function getGithubCache(): TtlCache;