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
/delete
methods, capable of supporting SES (specificallyassert
error notes). Key validity, comparison, and referential strength are controlled by themakeMap
option, which defaults toWeakMap
but can be set to any producer of objects with those methods (e.g., usingMap
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).