A basic TTL cache with configurable TTL and check interval.
Private
Readonly
Clear the items that are in the cache.
Indicate that you are no longer going to use the cache. The cache will be cleared and it will stop checking for stale items.
Delete the item with the specific key. If the item does not exist, then there will be no change to the cache.
The key of the value to delete.
Get a value from the cache.
The key to get a value for.
The value for the key, or undefined if the key was not added, or if the value has expired.
Set an item in the cache. It will expire after the TTL specified in the cache configuration.
The key for the value.
The value to set.
Generated using TypeDoc
A basic TTL cache with configurable TTL and check interval.