initialize the cache
the configuration of the cache
clear the entire cache
set cache with customized configuration
customized configuration
Return a new instance of cache with customized configuration.
the customized configuration
produce a JSON object with meta-data and data value
the value of the item
optional, the specified meta-data
Return all the keys in the cache.
return the current size of the cache
the current size of the cache
Get item from cache. It will return null if item doesn’t exist or it has been expired. If you specified callback function in the options, then the function will be executed if no such item in the cache and finally put the return value into cache. Please make sure the callback function will return the value you want to put into the cache. The cache will abort output a warning: If the key is invalid
the key of the item
the options of callback function
remove item from the cache
the key of the item
the key of the item
the value of the item
optional, the specified meta-data
Customized in-memory cache with LRU implemented
cacheObj - object which store items
cacheList - list of keys in the cache with LRU
curSizeInBytes - current size of the cache
maxPriority - max of the priority
cacheSizeLimit - the limit of cache size