import { FSWatcher } from 'chokidar'; import { Context } from 'koa'; import LRUCache from 'lru-cache'; import { PluginServeMiddlewareConfig } from './middleware/plugin-transform'; interface ResponseBodyCache { rootDir: string; fileExtensions: string[]; } interface CacheEntry { body: string; headers: Record; filePath: string; lastModified: number; } interface CacheConfig { cache: LRUCache; cacheKey: string; cacheKeysForFilePaths: Map; context: Context; cfg: PluginServeMiddlewareConfig; } export declare function createResponseBodyCache(cfg: ResponseBodyCache, fileWatcher: FSWatcher): { cache: LRUCache; cacheKeysForFilePaths: Map; }; export declare function tryServeFromCache(cache: LRUCache, context: Context): Promise<{ cacheKey: string; context: Context; cached: boolean; cachedBody: string; }>; export declare function addToCache(config: CacheConfig): Promise; export {};