CacheEntry 

The cache entry is a typed container of cache data used to track the creation and expiration of cache entries.

Kind: global class


new CacheEntry(value, ttl) 

Initializes the cache entry.

Param Type Description
value \* The cache entry value.
ttl number The time to live in milliseconds.

cacheEntry._value : \* 

Cache entry value.

Kind: instance property of CacheEntry


cacheEntry._ttl : number 

The time to live in milliseconds. The cache entry is considered expired after this time.

Kind: instance property of CacheEntry


cacheEntry._created : number 

The timestamp of creation of this cache entry.

Kind: instance property of CacheEntry


cacheEntry.isExpired() ⇒ boolean 

Returns true if this entry has expired.

Kind: instance method of CacheEntry
Returns: boolean - true if this entry has expired.


cacheEntry.serialize() ⇒ Object 

Exports this cache entry into a JSON-serializable object.

Kind: instance method of CacheEntry
Returns: Object - This entry exported to a JSON-serializable object.


cacheEntry.getValue() ⇒ \* 

Returns the entry value.

Kind: instance method of CacheEntry
Returns: \* - The entry value.