Class: DekacheItem

DekacheItem

Used within the Dekache class.

new DekacheItem ()

Members

data object

The data that this cache item is storing.

init number

The Date.now() when this item was initially created.

time number

The Date.now() this item was last renewed.

Methods

checkTimeDiff (mins)boolean

Checks if this item was created longer than mins ago.

Name Type Description
mins number

the number of minutes to check against (integer).

Returns:
Type Description
boolean Based on if item was renewed longer than mins ago.

initialize (cache_data)

Called automatically when constructed

Name Type Description
cache_data object

The data to hold, can be any object or primative

Renews the time for this item. This will stop DekacheItem#checkTimeDiff from returning true. Which in turn, will stop the item from being cleared from the cache.