UNPKG

duoyun-ui

Version:

A lightweight desktop UI component library, implemented using Gem

18 lines 493 B
interface CacheOptions { max?: number; maxAge?: number; renewal?: boolean; } /** * 过期的不能自动清理,但超出最大容量时会被修剪 */ export declare class Cache<T = any> { #private; constructor({ max, maxAge, renewal }?: CacheOptions); setOptions(options: CacheOptions): void; set(key: string, value: T): T; get(key: string): T | undefined; get(key: string, init: (key: string) => T): T; } export {}; //# sourceMappingURL=cache.d.ts.map