Skip to content

Function: getOrSet()

getOrSet<T>(cache, key, load, options?): Promise<T | undefined>

Use Cacheable’s native in-flight get-or-set behavior, optionally retaining a successful value under a separate key for recovery when a later loader fails.

T

Cacheable

string

() => Promise<T>

GetOrSetOptions = {}

Promise<T | undefined>