import { RedisClient } from 'redis'; import { RequestHandler } from 'express'; export interface Config { isEnable?: boolean; ttl?: number; file?: { path?: string; }; redis?: { port?: number; host?: string; client?: RedisClient; setex?: Function; password?: string; database?: string; prefix?: string; } } export type Status = { status: 0 | 1 } export function init(config?: Config): Promise; export function set(key: string, value: any, time?: number): Promise; export function get(key: string): Promise; export function getAll(): Promise>; export function has(key: string): Promise; export function remove(key: string): Promise; export function removeByPattern(pattern: string | RegExp): Promise; export function clear(): Promise; export function middleware(time: number, prefix?: string): RequestHandler;