import { type CacheStore, type CacheSetOptions } from '@nl-framework/core'; import type { HttpExecutionContext } from '../guards/types'; import type { CallHandler, HttpInterceptor } from './types'; export interface HttpCacheInterceptorOptions extends CacheSetOptions { store: CacheStore; /** * Allowed HTTP methods to cache. Defaults to GET and HEAD. */ methods?: string[]; /** * Build a cache key from the execution context. Defaults to method + full URL. */ key?: (context: HttpExecutionContext) => string | undefined | Promise; /** * Whether a given response/result should be cached. */ shouldCacheResult?: (context: HttpExecutionContext, result: unknown) => boolean | Promise; /** * Limit which HTTP status codes are cached when the handler returns a Response. * Defaults to 200 only. */ statusCodes?: number[]; } export declare class HttpCacheInterceptor implements HttpInterceptor { private readonly options; private readonly cacheableMethods; private readonly statusCodes; constructor(options: HttpCacheInterceptorOptions); intercept(context: HttpExecutionContext, next: CallHandler): Promise; private resolveKey; private shouldCache; private serialize; private restore; } //# sourceMappingURL=cache.interceptor.d.ts.map