new CacheItem(cache, key, item, order, expireAfterMsecs)
Parameters:
Name | Type | Description |
---|---|---|
cache |
Cache.<any, T> | CacheMapBased.<any, T> | CacheWithLoad.<any, T> | The cache this item belongs to. |
key |
TKey | |
item |
T | |
order |
Number | An integer used to order this item, assigned by the cache. |
expireAfterMsecs |
Number | An integer, in milliseconds, to expire this item after. Only used if > 0. This item then sets a timeout and upon elapse, evicts itself from the cache. |
- Source:
Members
accessCount :Number
Type:
- Number
- Source:
item :T
Type:
- T
- Source:
key :String|Symbol
Type:
- String | Symbol
- Source:
order :Number
Type:
- Number
- Source:
timeStamp :JSBI.BigInt
Type:
- JSBI.BigInt
- Source:
Methods
clearTimeout() → {this}
Clears the internal eviction timeout.
- Source:
Returns:
- Type
- this
increaseAccessCount() → {this}
- Source:
Returns:
- Type
- this
updateAccessTime() → {void}
- Source:
Returns:
- Type
- void