Create an empty cache.
Optionaloptions: MemoryCacheOptions
Optional size limit. See MemoryCacheOptions.
Total size of cached values in bytes.
Number of cached entries.
Remove all entries.
Remove key if present.
Cache key.
Look up key, marking it most recently used.
Cache key.
The cached bytes, or undefined.
Store value under key, evicting least-recently-used entries as
needed. Values larger than the whole cache are not stored.
Cache key.
Bytes to store (not copied; must not be mutated afterwards).
In-memory ByteCache with least-recently-used eviction, bounded by the total size of its values.
Example