import { HttpConfig } from "../types"; import { Encryptor } from "../encryptor"; export type CacheManagerOption = { bucket?: T3; encryptKey?: boolean; warnOnLowSpace?: boolean; encryptor?: Encryptor; }; export interface CacheManager { clear(): Promise; usedSpace(): Promise; availableSpace(): Promise; find(cond: (key: string) => boolean): Promise; has(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>; remove(configOrKey: string | HttpConfig, resolve?: { exists: boolean; key: string; }): Promise; }