Skip to content
Researched developer tool comparisonsPrices dated · vendor sources linked · no star ratings
Search

Stage 03 · Host · Researched comparison

Best Node JS Caching Libraries in 2026

lru-cache is the first pick for most teams that need a fast in-process cache with size limits and expiry, because it is small, well documented and widely used. If you need a shared cache across processes, use Keyv with a Redis adapter or a Redis client such as ioredis. For the smallest possible in-process dependency, quick-lru is a good fit.

By
Published 28 Nov 2026 · 6 tools compared

We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.

Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.

Key takeaways

  • lru-cache, quick-lru, Keyv and cache-manager are free and open source; ioredis and node-redis are also open source clients.
  • In-process caches such as lru-cache and quick-lru live in one Node process, so each worker or container has its own copy.
  • Keyv and cache-manager add a storage adapter layer so the same API can sit in front of memory, Redis or other backends.
  • ioredis and node-redis are Redis clients, not caches by themselves; you still run and pay for a Redis server.

Who each pick is for

  • In-process caches that need size limits and TTLlru-cache
  • One key-value API across memory, Redis and other storesKeyv
  • A cache layer with pluggable stores and wrapperscache-manager
  • Full-featured Redis client for shared cachesioredis
  • Official Redis client with typed command supportnode-redis
  • Tiny LRU cache with a minimal APIquick-lru

Comparison

The 6 tools at a glance
ToolBest forStandout featureListed starting priceFree plan or trial
1lru-cacheIn-process caches that need size limits and TTLLeast-recently-used eviction with max size and entry countFree (open source)Free plan
2KeyvOne key-value API across memory, Redis and other storesAdapter model lets you swap storage backends without changing call sitesFree (open source)Free plan
3cache-managerA cache layer with pluggable stores and wrappersStore abstraction with memory and Redis optionsFree (open source)Free plan
4ioredisFull-featured Redis client for shared cachesCluster, Sentinel and pipeline supportFree (open source)Free plan
5node-redisOfficial Redis client with typed command supportMaintained by Redis with TypeScript supportFree (open source)Free plan
6quick-lruTiny LRU cache with a minimal APIVery small surface area with maxSize and maxAgeFree (open source)Free plan

How we picked

We picked libraries that are actively maintained and genuinely used for caching in Node.js, then checked each against its documentation and repository. Criteria were fit for the job (in-process versus shared), supported platforms, licence and price, how the cache handles memory limits and expiry, and the main operational limits such as needing a Redis server. Sources are vendor pages, project documentation and public repositories. Prices and plan details can change, so confirm on the vendor site before you commit.

The tools, one by one

01

lru-cache

Best for in-process caches that need size limits and TTL

Visit github.com
lru-cache homepage
lru-cache homepage, captured Nov 2026

What it is and where it fits

lru-cache is a least-recently-used cache for Node.js. You set a maximum size or entry count, and it evicts the least recently used items when the cache is full. It also supports per-entry TTL, a stale-while-revalidate style option, and a fetch method that deduplicates concurrent loads of the same key.

It runs anywhere Node.js runs and has no external service dependency. The package ships TypeScript types. Because the cache lives in memory, it is lost on restart and is not shared between workers, cluster processes or containers.

Choose lru-cache when you want bounded memory and predictable eviction in a single service. Skip it when several instances must see the same cached values; add a shared store instead.

Standout: Least-recently-used eviction with max size and entry count

Pricing pointer

Free (open source), as listed by the vendor (lru-cache website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Least-recently-used eviction with max size and entry count
  • supports TTL, stale data and fetch wrappers

Drawbacks

  • Data stays inside one process
  • no built-in shared backend

Skip it if this limit matters to you: data stays inside one process.

Verdict. A sensible pick for in-process caches that need size limits and TTL.

Alternatives in this guide: Keyv, cache-manager, ioredis

02

Keyv

Best for one key-value API across memory, Redis and other stores

Visit github.com
Keyv homepage
Keyv homepage, captured Nov 2026

What it is and where it fits

Keyv is a key-value storage library with a simple get, set, delete and clear API. Its main feature is adapters: you can point it at an in-memory map, Redis, or other supported stores, and keep the same code. TTL and key namespaces are supported.

This makes Keyv useful when you want to start with memory in development and move to a shared store in production without rewriting cache logic. It is also used as a storage layer by other tools.

The trade-off is that a shared cache is only as good as the backend you attach. You still operate Redis or another store, and behaviour such as eviction and persistence follows that backend, not Keyv itself. Check the adapter documentation for the store you plan to use.

Standout: Adapter model lets you swap storage backends without changing call sites

Pricing pointer

Free (open source), as listed by the vendor (Keyv website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Adapter model lets you swap storage backends without changing call sites
  • supports TTL and namespaces

Drawbacks

  • Shared caching depends on a separate store you must run
  • adapter behaviour varies by backend

Skip it if this limit matters to you: shared caching depends on a separate store you must run.

Verdict. A sensible pick for one key-value API across memory, Redis and other stores.

Alternatives in this guide: lru-cache, cache-manager, ioredis

03

cache-manager

Best for a cache layer with pluggable stores and wrappers

Visit github.com
cache-manager homepage
cache-manager homepage, captured Nov 2026

What it is and where it fits

cache-manager is a caching layer for Node.js that sits above storage engines. It provides a common interface for get, set and delete, plus a wrap helper that caches the result of an async function under a key. Stores include an in-memory option and Redis-backed options.

It suits applications that want one caching API and the ability to change stores later, or that want function-result caching without writing the boilerplate. The project is maintained in the jaredwray/cacheable repository.

The cost is setup. You configure a store, and the features you get, such as TTL handling and key scanning, depend on that store. For a single process that only needs an LRU cache, a smaller library is less work.

Standout: Store abstraction with memory and Redis options

Pricing pointer

Free (open source), as listed by the vendor (cache-manager website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Store abstraction with memory and Redis options
  • wrap helper for caching function results

Drawbacks

  • Configuration is heavier than a single-purpose cache
  • store features differ

Skip it if this limit matters to you: configuration is heavier than a single-purpose cache.

Verdict. A sensible pick for A cache layer with pluggable stores and wrappers.

Alternatives in this guide: lru-cache, Keyv, ioredis

04

ioredis

Best for full-featured Redis client for shared caches

Visit github.com
ioredis homepage
ioredis homepage, captured Nov 2026

What it is and where it fits

ioredis is a Redis client for Node.js. It handles connections, commands, pipelining, pub/sub, and Redis Cluster and Sentinel setups. To use it as a cache, you call Redis commands such as SET with an expiry, GET, and DEL, or use hashes and sorted sets for more complex patterns.

It is a good fit when several services or processes must share cached data, or when you need Redis features beyond simple key-value storage. The client is open source and maintained under the redis organization.

The important limit is that ioredis is a client, not a cache. You need a Redis server, which you host or pay for, and you own its memory limits, eviction policy and persistence settings. For a single-process cache, a library like lru-cache is simpler.

Standout: Cluster, Sentinel and pipeline support

Pricing pointer

Free (open source), as listed by the vendor (ioredis website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Cluster, Sentinel and pipeline support
  • works with common Redis cache patterns

Drawbacks

  • You must run and pay for Redis separately
  • not a cache on its own

Skip it if this limit matters to you: you must run and pay for Redis separately.

Verdict. A sensible pick for full-featured Redis client for shared caches.

Alternatives in this guide: lru-cache, Keyv, cache-manager

05

node-redis

Best for official Redis client with typed command support

Visit github.com
node-redis homepage
node-redis homepage, captured Nov 2026

What it is and where it fits

node-redis is the Redis client maintained by Redis itself. It provides commands for caching patterns, connection handling, and support for cluster and sentinel deployments, plus integrations for Redis modules. TypeScript types are included.

Use it when you want the vendor-maintained client and are comfortable with its command API. It works for the same shared-cache jobs as ioredis: storing session data, computed results or rate-limit counters where multiple processes read the same values.

As with any Redis client, the cache is the server, not the library. You provision Redis, set an eviction policy such as allkeys-lru or volatile-lru, and monitor memory. Moving between node-redis and ioredis is possible but not a drop-in change.

Standout: Maintained by Redis with TypeScript support

Pricing pointer

Free (open source), as listed by the vendor (node-redis website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Maintained by Redis with TypeScript support
  • covers cluster, sentinel and common modules

Drawbacks

  • Requires a Redis server
  • API differs from ioredis, so migration takes work

Skip it if this limit matters to you: requires a Redis server.

Verdict. A sensible pick for official Redis client with typed command support.

Alternatives in this guide: lru-cache, Keyv, cache-manager

06

quick-lru

Best for tiny LRU cache with a minimal API

Visit github.com
quick-lru homepage
quick-lru homepage, captured Nov 2026

What it is and where it fits

quick-lru is a small least-recently-used cache. You set a maximum item count and an optional max age, and it evicts old entries. The API is intentionally minimal: get, set, has, delete, clear and a few helpers.

It fits small services, CLI tools and libraries that want bounded caching without pulling in a larger dependency. The codebase is short, which helps when you need to review what a dependency does.

The limits are the flip side of its size. It does not offer the fetch deduplication, stale handling or size-based accounting that lru-cache provides, and it does not share data across processes. If you need those features, use lru-cache or a Redis-backed option.

Standout: Very small surface area with maxSize and maxAge

Pricing pointer

Free (open source), as listed by the vendor (quick-lru website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Very small surface area with maxSize and maxAge
  • simple to read and audit

Drawbacks

  • Fewer features than lru-cache
  • in-process only

Skip it if this limit matters to you: fewer features than lru-cache.

Verdict. A sensible pick for tiny LRU cache with a minimal API.

Alternatives in this guide: lru-cache, Keyv, cache-manager

Who should use what

A single Node service that needs bounded memory should start with lru-cache, or quick-lru if it wants the smallest dependency. A project that expects to move from memory to Redis later should use Keyv or cache-manager so the call sites stay the same. A system with many workers, containers or services that must share cached data needs a Redis client such as ioredis or node-redis, plus a Redis deployment.

Questions to settle before you buy

What to check before you buy

  • Decide whether one process or many need the cached data; in-process caches do not share state.
  • Set a memory bound or entry limit so the cache cannot grow without control.
  • Confirm TTL and eviction behaviour in the docs, including what happens when the cache is full.
  • For Redis, check the eviction policy and memory limit on the server, not just the client code.
  • Review the licence and maintenance activity of the repository before adding it as a dependency.

FAQ

Do I need Redis to cache in Node.js?

No. Libraries such as lru-cache and quick-lru cache inside the Node process with no external service. You only need Redis when multiple processes or servers must read the same cached values, or when you need cache data to survive a restart.

What is the difference between an LRU cache and a TTL cache?

An LRU cache evicts the least recently used entries when it hits a size limit. A TTL cache expires entries after a set time. Many libraries support both. lru-cache and quick-lru focus on size-based eviction and also support expiry.

Can I use Keyv or cache-manager with Redis?

Yes. Both provide a storage abstraction with Redis-backed adapters. You keep the same get and set calls and change the store configuration. The Redis server still needs to be provisioned and monitored separately.

Is ioredis or node-redis better for caching?

Both are open-source Redis clients and both can run cache commands. node-redis is maintained by Redis; ioredis has broad cluster and sentinel support and a large existing user base. The choice usually comes down to API preference and existing code, not caching features.

Will an in-process cache work with multiple Node workers?

Not as a shared cache. Each worker, cluster process or container has its own memory, so a value cached in one is not visible to another. Use a shared store such as Redis when workers must see the same data, and keep in-process caches for data that is cheap to recompute per worker.

Sources we checked

Method: how we score · editorial policy.

  1. lru-cache (official site)
  2. Keyv (official site)
  3. cache-manager (official site)
  4. ioredis (official site)
  5. node-redis (official site)
  6. quick-lru (official site)

Change log. First published 28 Nov 2026.