The add method adds a key with given value when key doesn't exists.
Optionalsettings: CacheWriteSettingsReturns true when key doesn't exists otherwise false will be returned.
The addOrFail method adds a key with given value when key doesn't exists.
Throws an error if the key exists.
Optionalsettings: CacheWriteSettingsThe decrement method decrements the given key with given value.
An error will thrown if the value is not a number.
Optionalvalue: Extract<TType, number>If not defined then it will be defaulted to 1.
Returns true if the key where decremented otherwise false will be returned.
The decrementOrFail method decrements the given key with given value.
An error will thrown if the value is not a number or if the key is not found.
Optionalvalue: Extract<TType, number>If not defined then it will be defaulted to 1.
The getOr method will retrieve the given key if found otherwise defaultValue will be returned.
The getOrAdd method will retrieve the given key if found otherwise valueToAdd will be added and returned.
Optionalsettings: CacheWriteSettingsThe increment method increments the given key with given value.
An error will thrown if the value is not a number.
Optionalvalue: Extract<TType, number>If not defined then it will be defaulted to 1.
Returns true if the key where incremented otherwise false will be returned.
The incrementOrFail method increments the given key with given value.
An error will thrown if the value is not a number or if the key is not found.
Optionalvalue: Extract<TType, number>If not defined then it will be defaulted to 1.
The put method replaces th given key with the given value and ttl if the key exists
othwerwise it will add the given value with the given ttl.
Optionalsettings: CacheWriteSettingsReturns true if the key where replaced otherwise false is returned.
The removeMany method removes many keys.
The param items can be a string or an Iterable of strings.
If the param items are an Iterable, it will be joined into a single string.
Think of an Iterable as representing a path.
Returns true if one of the keys where deleted otherwise false is returned.
The
ICacheBasecontract defines a way for as key-value pairs independent of data storage.IMPORT_PATH:
"@daiso-tech/core/cache/contracts"