.clone()
→ LimitedCollection<K, V>
Clone into a new LimitedCollection with the same limits (no onEvict callback).
client.users.clone();Class
Collection with optional FIFO eviction when a new key is inserted at capacity. Construction is Map-safe: options are never passed to super(), so subclasses can call super({ maxSize, onEvict }) without Map treating the options object as an iterable.
Extends Collection
new LimitedCollection(options: LimitedCollectionOptions<K, V>)LimitedCollectionOptions<K, V>→ LimitedCollection<K, V>
Clone into a new LimitedCollection with the same limits (no onEvict callback).
client.users.clone();key: K, value: V → this
Insert or update an entry. When at capacity and key is new, the oldest entry is removed (FIFO by Map insertion order) and onEvict is invoked if set.
client.users.set(key, value);filter?: (value: V, key: K) => boolean → number
Remove entries matching filter (or all if omitted). Returns count removed. Does not invoke onEvict — callers that need cascade teardown should handle it.
client.users.sweep();