import { default as EventEmitter } from 'events'; import { CacheValueType } from '.'; import { AdapterInstance } from '../adapter'; export declare const getCacheEvents: (emitter: EventEmitter) => { /** * Set cache data * @param data */ emitCacheData: (data: CacheValueType & { cached: boolean; }, isTriggeredExternally?: boolean) => void; /** * Invalidate cache values event */ emitInvalidation: (cacheKey: string, isTriggeredExternally?: boolean) => void; /** * Delete of cache values */ emitDelete: (cacheKey: string, isTriggeredExternally?: boolean) => void; /** * Cache data listener * @param callback * @returns */ onData: (callback: (data: CacheValueType & { cached: boolean; }) => void) => VoidFunction; /** * Cache data listener * @param cacheKey * @param callback * @returns */ onDataByKey: (cacheKey: string, callback: (data: CacheValueType) => void) => VoidFunction; /** * Cache invalidation listener * @param callback * @returns */ onInvalidate: (callback: (cacheKey: string) => void) => VoidFunction; /** * Cache invalidation listener * @param cacheKey * @param callback * @returns */ onInvalidateByKey: (cacheKey: string, callback: () => void) => VoidFunction; onDelete: (callback: (cacheKey: string) => void) => VoidFunction; onDeleteByKey: (cacheKey: string, callback: () => void) => VoidFunction; }; //# sourceMappingURL=cache.events.d.ts.map