OptionalcleanupIntervalMs: numberClean all keys from the store.
The number of keys that were removed.
Decrement the value associated with a key. Value needs to be a number.
The key to decrement the value for.
The amount to decrement by.
The new value after decrementing.
Delete a key from the store.
The key to delete.
true if the key was deleted, false otherwise.
Set the expiration time for a key.
The key to set the expiration for.
The time-to-live for the key, in seconds.
true if the expiration was set, false otherwise.
Get the value associated with a key.
The type of the value to retrieve.
The key to retrieve the value for.
The value associated with the key, or null if the key does not exist.
Increment the value associated with a key. Value needs to be a number.
The key to increment the value for.
The amount to increment by.
The new value after incrementing.
Set the value associated with a key.
The type of the value to set.
The key to set the value for.
The value to set.
OptionalttlSec: numberThe time-to-live for the key, in seconds.
Get the remaining time-to-live for a key.
The key to retrieve the TTL for.
The remaining time-to-live for the key, in seconds.
In-memory key-value store implementation with automatic cleanup of expired entries.
Provides a memory-based implementation of the KvStore interface with TTL support and automatic background cleanup of expired entries.