/**
 * Response cache — cache non-streaming responses by content hash.
 * LRU eviction with TTL. Useful for repeated identical queries.
 */
export interface CacheEntry {
    key: string;
    body: string;
    statusCode: number;
    headers: Record<string, string>;
    cachedAt: number;
    hits: number;
}
export interface CacheConfig {
    maxEntries: number;
    maxBytes: number;
    ttlMs: number;
    enabled: boolean;
}
/**
 * Configure the cache.
 */
export declare function configureCache(opts: Partial<CacheConfig>): void;
/**
 * Generate cache key from model + messages.
 */
export declare function cacheKey(model: string, messages: unknown[], extra?: Record<string, unknown>): string;
/**
 * Get a cached response if available and not expired.
 */
export declare function getCached(key: string): CacheEntry | null;
/**
 * Store a response in the cache.
 */
export declare function putCache(key: string, body: string, statusCode: number, headers?: Record<string, string>): void;
export interface CacheStats {
    size: number;
    maxEntries: number;
    maxBytes: number;
    currentBytes: number;
    ttlMs: number;
    enabled: boolean;
    totalHits: number;
    totalMisses: number;
    hitRate: number;
}
/**
 * Get cache statistics.
 */
export declare function getCacheStats(): CacheStats;
/**
 * Clear all cached entries.
 */
export declare function clearCache(): void;
/**
 * Reset cache and stats (for testing).
 */
export declare function resetCache(): void;
