Best Caching & Key-Value Store
In-memory cache, sessions, and rate limits. Ranked by which tools AI agents actually pick when developers build — measured live across Claude, GPT, Gemini.
As of Jun 24, 2026, the key-value store AI agents pick most is Redis at 59%, measured across Claude, GPT, Gemini.
| # | Tool | Pick Rate | Default Rate | Shortlist |
|---|---|---|---|---|
| 1 | Redis | 59% [51%–66%] | 78% | 87% |
| 2 | Vercel KV | 8% [5%–14%] | 0% | 20% |
| 3 | Upstash | 6% [3%–12%] | 0% | 13% |
| 4 | Memcached | 0% [0%–3%] | 0% | 29% |
| 5 | Momento | 0% [0%–3%] | 0% | 3% |
What is a key-value store?
A key-value store is a fast, usually in-memory database for caching, sessions, rate limiting, and ephemeral data. Redis set the de-facto protocol, and most options are either Redis itself or Redis-compatible services tuned for different deployment models.
Caching is the first lever to speed up an app, and the KV store quickly becomes load-bearing for sessions and rate limits. Serverless changed the game — traditional Redis expects a persistent TCP connection, which serverless functions don't have, opening the door to HTTP-based and serverless-native stores.
How to choose
What separates the Caching & KV options.
Self-hosted Redis is cheap and flexible; managed services remove ops and scaling work.
Serverless and edge runtimes need an HTTP-based store, not a long-lived TCP connection.
Compatibility means you keep the Redis ecosystem and client libraries.
Per-request, per-GB, or fixed pricing scales very differently with your traffic.
Best key-value store for your use case
| If you need… | Reach for | Why |
|---|---|---|
| Classic in-memory cache | Redis | The protocol standard; self-host or use a managed Redis. |
| Serverless / edge KV | Upstash / Vercel KV | HTTP-based Redis that works from serverless and edge functions. |
| Low-latency managed cache | Momento | Serverless cache with no instances to manage. |
| Simple, lightweight cache | Memcached | Battle-tested, no-frills in-memory caching. |
Caching & KV: incumbents vs new entrants
Redis is the protocol everyone speaks; the differentiation is the deployment model — self-hosted, managed, or serverless/edge-native.
Why AI agents decide this category
'Add caching' makes an agent reach for Redis by reflex. But serverless apps can't hold a Redis connection, so the interesting question is whether the agent recognizes that and reaches for an HTTP-based store — the kind of context that separates a good default from a wrong one.
Frequently asked questions
What is a key-value store?
A key-value store is a fast, usually in-memory database that maps keys to values — used for caching, sessions, rate limits, and ephemeral data. Redis is the de-facto standard protocol.
What is the best caching solution for Node.js?
Redis for classic caching, Upstash or Vercel KV for serverless/edge, Momento for a hands-off managed cache. The ranking above shows which AI agents pick.
Redis vs Upstash — which should I use?
Redis (self-hosted or managed) uses a persistent TCP connection; Upstash exposes Redis over HTTP so it works from serverless and edge functions. Pick by your runtime.
Memcached vs Redis?
Memcached is a simpler pure cache; Redis adds data structures, persistence, pub/sub, and a richer ecosystem. Most new apps choose Redis.