Create a bounded-size cache having WeakMap-compatible
has/get/set/delete methods, capable of supporting SES (specifically
assert error notes).
Key validity, comparison, and referential strength are controlled by the
makeMap option, which defaults to WeakMap but can be set to any producer
of objects with those methods (e.g., using Map allows for arbitrary keys
which will be strongly held).
Cache eviction policy is not currently configurable, but strives for a hit
ratio at least as good as
LRU (e.g., it
might be
CLOCK
or SIEVE).
Create a bounded-size cache having WeakMap-compatible
has/get/set/deletemethods, capable of supporting SES (specificallyasserterror notes). Key validity, comparison, and referential strength are controlled by themakeMapoption, which defaults toWeakMapbut can be set to any producer of objects with those methods (e.g., usingMapallows for arbitrary keys which will be strongly held). Cache eviction policy is not currently configurable, but strives for a hit ratio at least as good as LRU (e.g., it might be CLOCK or SIEVE).