The type of the keys in the map.
The type of the values in the map.
Private
lastPrivate
Readonly
mapOptional
lastPrivate
Readonly
optionsGets the number of key-value pairs in the TimedMap.
The number of key-value pairs in the TimedMap.
Returns an iterable iterator that contains the entries of the timed map. Each entry is a key-value pair, represented as an array [key, value]. If the entries have expired based on the time-to-live (ttl) option, they are skipped.
An iterable iterator of key-value pairs.
Sets a key-value pair in the map. If the key already exists, updates the value and updates the last access timestamp. If the key does not exist, adds a new entry with the specified key, value, and creation timestamp. Performs cleanup if necessary.
The key to set.
The value to set.
The updated TimedMap instance.
Private
should
Represents a map with timed entries. Entries in the map have an optional expiration time and can be automatically cleaned up.