WeakMapStorage

storage/WeakMapStorage~ WeakMapStorage

A specialization of the MapStorage storage mimicking the native WeakMap using its internal garbage collector used once the size of the storage reaches the configured threshold.

Constructor

new WeakMapStorage(config)

Source:
Initializes the storage.
Parameters:
Name Type Description
config Object Weak map storage configuration. The fields have the following meaning: - entryTtl The time-to-live of a storage entry in milliseconds.

Members

_entryTtl :number

Source:
The time-to-live of a storage entry in milliseconds.
Type:
  • number

Methods

_discardExpiredEntries()

Source:
Deletes all expired entries from this storage.

delete()

Source:

get()

Source:

has()

Source:

keys()

Source:

set()

Source:

size()

Source: