Skip to content

Documentation / @frak-labs/core-sdk / index / getCache

Function: getCache()

getCache(cacheKey): { clear: () => void; has: (cacheTime) => boolean; }

Defined in: utils/cache/withCache.ts:100

Get a cache handle for a specific key, useful for manual invalidation.

Parameters

cacheKey

string

Returns

clear

() => void

Clear both the pending promise and the cached response

has

(cacheTime) => boolean

Check if a non-expired response exists

Example

// Invalidate merchant info cache after a mutation
getCache("frak_getMerchantInformation").clear();