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 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 methods upsert the given key and replaces the ttl when updated.
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 storing and reading as key-value pairs independent of data storage.IMPORT_PATH:
"@daiso-tech/core/cache/contracts"