import LRU from 'lru-cache'; import { FutureResolveType } from '../common/helpers'; export declare class CacheManager { static cache: LRU; static shortCache: LRU; /** * 缓存工具,将 resolver 的结果按 ttl: [seconds] 保存在内存中,默认过期为 60 min * @param key * @param resolver * @param seconds */ static cacheable(key: any, resolver: FutureResolveType, seconds?: number): Promise; static set(key: any, value: any, ttl?: number): void; static get(key: any): T; static clearAll(): void; static clear(key: any): Promise; } export declare function Cacheable(options: { type?: 'default' | 'short'; key: string; }): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;