loading code fetching the highlighted snippet
Cache API-response-like records with logical KiB weights, protect entries through access, and trigger single or multiple LRU evictions from one insertion.
maxWeight limits aggregate application-defined weight. It does not
measure retained JavaScript heap automatically.maxSize: 0 so weight is its only capacity limit; the
normal default remains 100 entries.cache.get(key) and moves that record to MRU. Weighted LRU
removes the least recently used record, not the physically largest one.user-defined logical payload cost, not measured heap memory