import { AppService } from '../app/app.service';
import { LocalstorageConfigs, LocalstorageIterateHandler, LocalstorageIterateKeysHandler } from '../localstorage/types';
import { CacheRefresher } from './types';
export declare class CacheService {
    private Localstorage;
    app: AppService;
    constructor(app: AppService, storageConfigs?: LocalstorageConfigs);
    instance(storageConfigs: LocalstorageConfigs): CacheService;
    cacheTime(cacheTime: number): number;
    set<Data>(key: string, data: Data, cacheTime?: number): Promise<Data>;
    get<Data>(key: string, always?: boolean): Promise<Data | {
        data: Data;
        expired: boolean;
    }>;
    getRefresh<Data>(key: string, cacheTime?: number, refresher?: CacheRefresher<Data>): Promise<Data>;
    iterate<Data>(handler: LocalstorageIterateHandler<Data>): Promise<any>;
    iterateKeys(handler: LocalstorageIterateKeysHandler): Promise<void>;
    remove(key: string): Promise<void>;
    removeBulk(keys: string[]): Promise<void>;
    removeByPrefix(prefix: string): Promise<void>;
    removeBySuffix(suffix: string): Promise<void>;
    flush(): Promise<void>;
    flushExpired(): Promise<void>;
}
