Interface: GetOrSetOptions
Options for the Cacheable-compatible get-or-set extension.
Extends
Section titled “Extends”GetOrSetFunctionOptions
Properties
Section titled “Properties”cachedOnErrorTtl?
Section titled “cachedOnErrorTtl?”
readonlyoptionalcachedOnErrorTtl?:string|number
TTL for the cached-on-error value. Defaults to 0, meaning no expiration.
cacheErrors?
Section titled “cacheErrors?”
optionalcacheErrors?:boolean
Inherited from
Section titled “Inherited from”GetOrSetFunctionOptions.cacheErrors
nonBlocking?
Section titled “nonBlocking?”
optionalnonBlocking?:boolean
If set, this will bypass the instances nonBlocking setting for the get call.
Inherited from
Section titled “Inherited from”GetOrSetFunctionOptions.nonBlocking
returnCachedOnError?
Section titled “returnCachedOnError?”
readonlyoptionalreturnCachedOnError?:boolean
Return a separately retained successful value when the loader fails. Defaults to false.
throwErrors?
Section titled “throwErrors?”
optionalthrowErrors?:boolean|GetOrSetThrowErrorsContext
Whether or not to throw errors:
false(default) - do not throw any errorstrue- throw any error"function"- only throw errors that occur in the provided function / setter"store"- only throw errors that occur when getting/setting the cache
Inherited from
Section titled “Inherited from”GetOrSetFunctionOptions.throwErrors
optionalttl?:string|number|PerStoreTtl
Inherited from
Section titled “Inherited from”GetOrSetFunctionOptions.ttl