Skip to main content
Version: 3.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, AdapterType>) => void;
emitRevalidation: (cacheKey: string) => void;
onData: (cacheKey: string, callback: (data: CacheValueType<Response, Error, AdapterType>) => void) => VoidFunction;
onRevalidate: (cacheKey: string, callback: () => void) => VoidFunction;
}