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.
The storage.
Key to set/update.
Value to store.
Optional
expiration: numberHow long this data should stay valid in milliseconds.
Sets the value for the given key. Should error if the data is already expired.
The storage.
Key to set/update.
Value to store.
Optional
expires: DateWhen this value expires. Never if undefined.
Private
toPrivate
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).