import { HttpConfig } from "../types"; import { Encryptor } from "../encryptor"; export type CacheManagerOption = { bucket?: any; encryptKey?: boolean; encryptor?: Encryptor; }; export interface CacheManager { clear(): Promise; usedSpace(): Promise; availableSpace(): Promise; find(cond: (key: string) => boolean): Promise; has(configOrKey: string | HttpConfig): Promise; remove(configOrKey: string | HttpConfig): Promise; set(configOrKey: string | HttpConfig, value: T): Promise; getValue(configOrKey: string | HttpConfig): Promise; calculateSpace(configOrKey: string | HttpConfig, value: T): Promise; get(configOrKey: string | HttpConfig): Promise<{ date: Date; value: T; } | undefined>; }