{"library":"node-lfu-cache","type":"library","category":null,"description":"A least-frequently-used (LFU) cache for Node.js, directly ported from lru-cache but using an LFU eviction algorithm based on the paper by Dhruv Bird. Current version 5.0.0 provides a configurable cache with options for max size, item length calculation, maxAge, dispose callbacks, stale returns, and noDisposeOnSet. The API includes set, get, peek, del, reset, has, and forEach. Unlike LRU caches, which evict least-recently-used items, this cache evicts least-frequently-used items, making it suitable for workloads where access frequency matters more than recency.","language":"javascript","status":"active","version":"5.0.0","tags":["javascript","mfu","lfu","cache"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install node-lfu-cache","imports":["import LFU from 'node-lfu-cache'","import LFU from 'node-lfu-cache'","import type { LFUOptions } from 'node-lfu-cache'"]},{"cmd":"yarn add node-lfu-cache","imports":[]},{"cmd":"pnpm add node-lfu-cache","imports":[]}],"homepage":"https://github.com/calvinmetcalf/node-lfu-cache#readme","github":"git://github.com/calvinmetcalf/node-lfu-cache","docs":null,"changelog":null,"pypi":null,"npm":"node-lfu-cache","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}