Makes room in a bounded store before a new key is inserted.
Drops expired entries when options.expired is given; at the bound, either
evicts the oldest inserted entries (the default) or, with policy: 'refuse',
drops nothing and logs the refusal at most once a minute.
Parameters
store: any
a Map or a realms.map() store
max: any
the bound
options: any
expired(value, key), policy, counter, name and
setting
Returns {evicted:number;ok:boolean}
ok (false only when refused) and the number evicted
Makes room in a bounded store before a new key is inserted.
Drops expired entries when
options.expiredis given; at the bound, either evicts the oldest inserted entries (the default) or, withpolicy: 'refuse', drops nothing and logs the refusal at most once a minute.