import type { Config } from "./config"; interface CacheItem { cacheTime: ReturnType; data: T; } export declare class CacheProvider { constructor(config: Config); mustValidate: boolean; private config; private defaultCacheTime; /** * Retrieve cache if existent, ignoring the time. * * The caller is responsible for handling proper validation, */ retrieveJson(cachekey: string): CacheItem | undefined; /** * Save data to cache. */ storeJson(cachekey: string, data: T): void; json(cachekey: string, block: () => Promise, cachetime?: number): Promise; /** * Delete all cached data. */ cleanup(): void; } export {};