Class: 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.


new WeakMapStorage(config)

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

The time-to-live of a storage entry in milliseconds.

Type:
  • number

Methods


_discardExpiredEntries()

Deletes all expired entries from this storage.


delete()


get()


has()


keys()


set()


size()