Optional
entryThe calculated size for the item, if sizes are used.
Optional
fetchThe status of a LRUCache#fetch operation. Note that this can change as the underlying fetch() moves through various states.
Optional
fetchThe abort signal received was ignored, and the fetch was allowed to continue.
Optional
fetchThe fetch received an abort signal
Optional
fetchThe OptionsBase.fetchMethod was called
Optional
fetchThe reason for a fetch() rejection. Either the error raised by the OptionsBase.fetchMethod, or the reason for an AbortSignal.
Optional
fetchThe fetchMethod promise was rejected
Optional
fetchThe fetchMethod promise resolved successfully
Optional
fetchThe cached value was updated after a successful call to OptionsBase.fetchMethod
Optional
getThe status of a LRUCache#get operation.
Optional
hasThe results of a LRUCache#has operation
Optional
maxA flag indicating that the item was not stored, due to exceeding the OptionsBase.maxEntrySize
Optional
nowThe timestamp used for TTL calculation
Optional
oldThe old value, specified in the case of set:'update'
or
set:'replace'
Optional
remainingTTLthe remaining ttl for the item, or undefined if ttls are not used.
Optional
returnedA fetch or get operation returned a stale value.
Optional
setThe status of a set() operation.
Optional
startthe start time for the item, or undefined if ttls are not used.
Optional
totalThe total calculated size of the cache, if sizes are used.
Optional
ttlthe ttl stored for the item, or undefined if ttls are not used.
Occasionally, it may be useful to track the internal behavior of the cache, particularly for logging, debugging, or for behavior within the
fetchMethod
. To do this, you can pass astatus
object to the LRUCache#fetch, LRUCache#get, LRUCache#set, LRUCache#memo, and LRUCache#has methods.The
status
option should be a plain JavaScript object. The following fields will be set on it appropriately, depending on the situation.