
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
This project is part of the Keyv suite.
In order to use LRU as your store in Keyv you will need to:
Install this module in your project:
npm install keyv-lru
This module is based on the tiny-lru
module. This is one of the best performing libraries for LRU storages.
Create your Keyv object by executing:
const { KeyvLru, KeyvLruManagedTtl } = require('keyv-lru');
const options = {
max: 1000,
notify: false,
ttl: 0,
expire: 0,
};
const keyvLru = new KeyvLru(options);
const keyvLruManagedTtl = new KeyvLruManagedTtl(options);
See tiny-lru to learn about the
available options.
KeyvLruManagedTtl uses a managed TTL strategy instead of timers. This is useful for serverless architectures. tiny-lru expires entries based on timers, that means that the event loop is not empty when the lambda function is finished. That blocks the end of the execution.
This implementation will store the expiration time along with the cached data
and it will deleter expired items upon retrieval. Alternatively there is an
evictExpired() method that will evict all the expired items.
Even when not using tiny-lru‘s built-in expiration system based on timers, we
still benefit a lot from the LRU store.
keyv-lru is MIT licensed.
FAQs
An in-memory LRU back-end for Keyv.
The npm package keyv-lru receives a total of 1,670 weekly downloads. As such, keyv-lru popularity was classified as popular.
We found that keyv-lru demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.