/** Default time-to-live for on-disk cache entries: 7 days. */ export declare const DEFAULT_CACHE_TTL_MS: number; /** * Points the on-disk content cache at oclif's `cacheDir`. * * The CLI and MCP call this from `BaseCommand.init()` with `this.config.cacheDir` * so cached docs live alongside other oclif cache data (e.g. `~/.cache/b2c` on * Linux, `~/Library/Caches/b2c` on macOS) and honor any oclif dir overrides — * mirroring how {@link initializeStatefulStore} injects `dataDir`. Standalone SDK * use (no oclif) falls back to an OS-idiomatic path. * * @param cacheDir - oclif's resolved `this.config.cacheDir` */ export declare function initializeContentCache(cacheDir: string): void; /** Which cache tier a hit came from. */ export type CacheSource = 'memory' | 'disk'; /** A cache hit: the content and which tier served it. */ export interface CachedEntry { content: string; source: CacheSource; } /** * Returns the cached entry for `url` (with the tier that served it) from memory * or a fresh-enough disk entry, or `undefined` on a miss. A disk hit repopulates * the in-memory tier. * * @param url - The fetch URL used as the cache key * @param ttlMs - Max age for a disk entry to count as a hit (default 7 days) */ export declare function getCachedEntry(url: string, ttlMs?: number): CachedEntry | undefined; /** * Returns cached content for `url` from memory or a fresh-enough disk entry, or * `undefined` on a miss. Thin wrapper over {@link getCachedEntry}. * * @param url - The fetch URL used as the cache key * @param ttlMs - Max age for a disk entry to count as a hit (default 7 days) */ export declare function getCachedContent(url: string, ttlMs?: number): string | undefined; /** * Stores freshly fetched content in both cache tiers. Disk write is best-effort. * * @param url - The fetch URL used as the cache key * @param content - The fetched content to cache */ export declare function setCachedContent(url: string, content: string): void; /** * Clears the in-memory cache (and optionally the on-disk cache). Intended for * tests and an explicit user "refresh docs" action. * * @param includeDisk - When true, also removes the on-disk cache directory */ export declare function clearContentCache(includeDisk?: boolean): void; /** On-disk cache statistics: number of cached files and their total size in bytes. */ export interface ContentCacheStats { /** Absolute path to the on-disk cache directory. */ dir: string; /** Number of cached `.md` files on disk. */ files: number; /** Total size of the cached files, in bytes. */ bytes: number; } /** Reports the on-disk cache directory, file count, and total size. */ export declare function getContentCacheStats(): ContentCacheStats; /** * Purges the docs content cache (both tiers) and reports what was on disk before * removal, for a user-facing "clear cache" command. * * @returns The pre-purge on-disk stats (files/bytes freed). */ export declare function purgeContentCache(): ContentCacheStats;