{"library":"lru","type":"library","category":null,"description":"A minimal O(1) LRU cache for Node.js supporting set, get, peek, remove, clear, and eviction events. Version 3.1.0 is stable and suitable for small caches. It uses a linked list and hash map for O(1) operations. Differentiators: simple API, evict event, optional maxAge for TTL, and CommonJS support. No TypeScript types, no ESM. Suitable for Node >= 0.4.0.","language":"javascript","status":"active","version":"3.1.0","tags":["javascript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install lru","imports":["const LRU = require('lru');","const cache = new LRU({ max: 100, maxAge: 60000 });","cache.on('evict', function(data) { console.log(data.key, data.value); });"]},{"cmd":"yarn add lru","imports":[]},{"cmd":"pnpm add lru","imports":[]}],"homepage":"http://github.com/chriso/lru","github":"ssh://git@github.com/chriso/lru","docs":null,"changelog":null,"pypi":null,"npm":"lru","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}