KeyValueStorage to actually store the data.
How often the expired data needs to be checked in minutes.
Protected
Readonly
loggerPrivate
Readonly
sourcePrivate
Readonly
timerPrivate
getPrivate
isPrivate
removeSets the value for the given key. Should error if the data is already expired.
Key to set/update.
Value to store.
Optional
expiration: numberHow long this data should stay valid in milliseconds.
The storage.
Sets the value for the given key. Should error if the data is already expired.
Key to set/update.
Value to store.
Optional
expires: DateWhen this value expires. Never if undefined.
The storage.
Private
toCreates a new object where the expires
field is a Date instead of a string.
Optional
expires?: DatePrivate
to
A storage that wraps around another storage and expires resources based on the given (optional) expiry date. Will delete expired entries when trying to get their value. Has a timer that will delete all expired data every hour (default value).