{"library":"weak-lru-cache","type":"library","category":null,"description":"A cache that combines LRU/LFU (LRFU) expiration with weak references, allowing garbage collection to reclaim unused cache entries. The cache retains strongly referenced data until it falls out of the LRU/LFU order, then uses weak references so the GC can free memory if needed. This package provides the WeakLRUCache class, which extends Map, and is suitable for Node.js (v14.10+) and Deno. Current version 1.2.2 is stable with a moderate release cadence. Compared to other LRU caches, weak-lru-cache's key differentiator is its use of weak references to avoid holding memory unnecessarily, making it ideal for large object caches where memory pressure is a concern.","language":"javascript","status":"active","version":"1.2.2","tags":["javascript","cache","weak","references","LRU","LRFU","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install weak-lru-cache","imports":["import { WeakLRUCache } from 'weak-lru-cache'","import WeakLRUCache from 'weak-lru-cache'","import type { WeakLRUCache } from 'weak-lru-cache'"]},{"cmd":"yarn add weak-lru-cache","imports":[]},{"cmd":"pnpm add weak-lru-cache","imports":[]}],"homepage":"https://github.com/kriszyp/weak-lru-cache#readme","github":"ssh://git@github.com/kriszyp/weak-lru-cache","docs":null,"changelog":null,"pypi":null,"npm":"weak-lru-cache","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}