import { CacheInfo, ResponseHeaders } from './types'; /** * Cache hint extraction result */ export interface CacheHints { /** Whether response is cacheable */ cacheable: boolean; /** Time-to-live in seconds */ maxAge?: number; /** Stale-while-revalidate window in seconds */ staleWhileRevalidate?: number; /** Entity tag for validation */ etag?: string; /** Last modified timestamp */ lastModified?: Date; /** Whether must revalidate before serving stale */ mustRevalidate: boolean; /** Whether response is private (user-specific) */ isPrivate: boolean; /** Whether response should not be stored */ noStore: boolean; /** Whether response should not be cached */ noCache: boolean; } /** * Extract cache hints from response headers * * @param headers - Response headers * @returns Parsed cache hints * * @example * ```typescript * const hints = extractCacheHints(response.headers); * if (hints.cacheable && hints.maxAge) { * cache.set(key, data, hints.maxAge * 1000); * } * ``` */ export declare function extractCacheHints(headers: ResponseHeaders): CacheHints; /** * Build cache info from response */ export declare function buildCacheInfo(headers: ResponseHeaders, fromCache?: boolean, age?: number): CacheInfo; /** * Generate Cache-Control header value * * @example * ```typescript * const cacheControl = generateCacheControl({ * maxAge: 3600, * isPrivate: true, * staleWhileRevalidate: 60, * }); * // Returns: 'private, max-age=3600, stale-while-revalidate=60' * ``` */ export declare function generateCacheControl(hints: Partial): string;