Skip to main content
Version: 5.x.x

getCacheEvents


import { getCacheEvents } from "@hyper-fetch/core"

Description

Defined in cache/cache.events.ts:6

Preview

getCacheEvents(emitter)

Parameters

NameDetails

emitter

Required

EventEmitter

Returns

{
emitCacheData: (cacheKey: string, data: CacheValueType<Response, Error, Adapter>) => void;
emitInvalidation: (cacheKey: string) => void;
onData: (cacheKey: string, callback: (data: CacheValueType<Response, Error, Adapter>) => void) => VoidFunction;
onInvalidate: (cacheKey: string, callback: () => void) => VoidFunction;
}