Class: baseCacheMultiManagementKlass

baseCacheMultiManagementKlass


new baseCacheMultiManagementKlass(params)

constructor
Parameters:
Name Type Description
params Object cache key generation & expiry related params

Methods


_fetchFromCache()

fetch from cache
Returns:
Type
Object

_setCache(dataToSet)

set data in cache.
Parameters:
Name Type Description
dataToSet Object data to set in cache
Returns:
Type
Result

clear()

clear cache
Returns:
Type
Promise.<Result>

fetch()

Fetch data from cache, in case of cache miss calls sub class method to fetch data from source
Returns:
- On success, data.value has value. On failure, error details returned.
Type
Promise.<Result>

fetchDataFromSource()

fetch data from source return should be of klass Result data attr of return is returned and set in cache
Returns:
Type
Result

setCacheExpiry()

set cache expiry in oThis.cacheExpiry and return it
Returns:
Type
Number

setCacheKeys()

set cache keys in oThis.cacheKeys and return it
Returns:
Type
String