import RedisDriver from './RedisDriver.js'; import { Context } from 'koa'; interface ICacheOptions { age?: string; headers?: Record; query?: string | string[] | boolean; } interface ICacheConfig { age: number; headers: Record; query: string[]; } interface IConstructor { enabled: boolean; keyPrefix: string; redisModeMap?: Record; redisPort?: number; redisUri: string; } interface IGenerateKey { ctx: Context; query: string[]; } declare class Index { private _enabled; private _redisDriver; constructor(params: IConstructor); static generateCacheControl(age: number): string; static generateConfig(rawParams?: ICacheOptions | string): ICacheConfig; static generateKey({ ctx, query }: IGenerateKey): string; static generateSurrogateControl(age: number): string; cache(options: ICacheOptions): (ctx: Context, next: () => void) => Promise; flushCache(): Promise; getRedisDriver(): RedisDriver; } export default Index;