KeyValueStorage to actually store the data.
How often the expired data needs to be checked in minutes.
Deletes the value stored for the given key.
An iterable of entries in the storage.
Stops the continuous cleanup timer.
Returns the value stored for the given identifier.
undefined
if no value is stored.
Tries to get the data for the given key.
In case the data exists but has expired,
it will be deleted and undefined
will be returned instead.
Checks if there is a value stored for the given key.
Checks if the given data entry has expired.
Deletes all entries that have expired.
Sets the value for the given key. Should error if the data is already expired.
Creates a new object where the expires
field is a Date instead of a string.
Creates a new object where the expires
field is a string instead of a Date.
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).