getCacheEvents
Create the cache event emitters and listeners for data changes, invalidation, and deletion.
Import
import { getCacheEvents } from "@hyper-fetch/core"
Source
Package
Returns
getCacheEvents
| Name | Type | Description |
|---|---|---|
| emitCacheData | | Set cache data |
| emitDelete | | Delete of cache values |
| emitInvalidation | | Invalidate cache values event |
| onData | | Cache data listener for all keys |
| onDataByKey | | Cache data listener filtered by a specific cache key |
| onDelete | | Cache deletion listener for all keys |
| onDeleteByKey | | Cache deletion listener filtered by a specific cache key |
| onInvalidate | | Cache invalidation listener |
| onInvalidateByKey | | Cache invalidation listener |
