import { IReactionDisposer } from 'mobx';
/**
 * 声明缓存类型
 */
export declare type CacheOptions<K, V> = {
    max?: number;
    maxAge?: number;
    length?: (value: V, key: K) => number;
    stale?: boolean;
    dispose?: (key: K, value: V) => void;
    noDisposeOnSet?: boolean;
    updateAgeOnGet?: boolean;
};
/**
 * 导出 Cache 类
 */
export default class Cache<K, V> {
    constructor(options: any);
    set max(mL: any);
    get max(): any;
    set allowStale(allowStale: any);
    get allowStale(): any;
    set maxAge(mA: any);
    get maxAge(): any;
    set lengthCalculator(lC: any);
    get lengthCalculator(): any;
    get length(): any;
    get itemCount(): any;
    rforEach(fn: any, thisp: any): void;
    forEach(fn: any, thisp: any): void;
    keys(): K[];
    values(): V[];
    reset(): void;
    dump(): any;
    dumpLru(): any;
    set(key: K, value: V, maxAge?: number): boolean;
    has(key: K): boolean;
    get(key: K): V;
    peek(key: K): V;
    pop(): V | null;
    del(key: K): void;
    load(arr: any): void;
    prune(): void;
}
export declare function refreshCacheOptions(cache: Cache<any, any>): IReactionDisposer;
