ReadonlydbReadonlydbReadonlydefaultReadonlygcReadonlygcLocal storage key name for the last GC completed timestamp.
ReadonlystoreReturns the ms timestamp for the last GC (garbage collection).
Set the ms timestamp for the last GC (garbage collection).
Returns all items as map of key to value, mainly used for debugging dumps. The type T is applied to all values, even though they might not be of type T (in the case when you store different data types in the same store).
Remove all items from the store.
Delete one or multiple keys.
Generic way to iterate through all entries.
Perform garbage-collection if due, else do nothing.
Perform garbage collection immediately without checking whether we are due for the next GC or not.
Get a value by key, or undefined if it does not exist.
Mainly used to get the expiration timestamp of an object.
Returns the number of items in the store. Note that getting the size requires iterating through the entire store because the items could expire at any time, and hence the size is a dynamic number.
You can create multiple KvStores if you want, but most likely you will only need to use the default
kvStoreinstance.