OptionalmaxMaximum number of entries before LRU eviction kicks in. Default 1000.
OptionalonOptional callback fired when an entry is evicted (LRU overflow, TTL expiry,
or explicit Delete/Clear). Useful for releasing handles owned by V
(e.g., calling .destroy() on an SDK client).
OptionalttlTime-to-live in milliseconds. When set, entries older than this are treated
as missing on Get() and evicted lazily. Use 0 or undefined to disable TTL.
Options for
MJLruCache. All fields are optional — defaults give a 1000-entry, no-TTL cache.