Softwr

Databases · head to head

Memcached vs Valkey

Memcached logo

Memcached

Databases

Distributed memory object caching system

From
Free
Rated
-
Valkey logo

Valkey

Databases

Open-source in-memory data store forked from Redis

From
Free
Rated
-

The short version

  • Each has a real cost: Memcached no persistence at all: restart a node and its cache is gone, which every design must assume; Valkey younger project, so its track record is short even though the codebase is not
  • They diverge on capability: Memcached covers In-memory key-value cache, Valkey covers Redis-compatible.

Where they differ

Only the attributes on which Memcached and Valkey actually diverge.

Attributes where Memcached and Valkey differ
AttributeMemcachedValkey
PlatformsLinux, macOS, Windows, Docker, Self-hostedLinux, macOS, Docker, Self-hosted

Identical on both: starting price (Free), pricing model (Open source, no licence fee; managed cloud billed separately), free tier (Yes), user rating (Not yet rated), category (Databases).

What each one covers

Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Memcached

  • In-memory key-value cache
  • Multithreaded
  • Client-side sharding
  • Predictable memory use

Only in Valkey

  • Redis-compatible
  • BSD licensed
  • Rich data structures
  • Replication and persistence

What people use each for

The jobs each tool is most often brought in to do.

Memcached

  • Caching expensive database query results to cut loadnot Valkey
  • Session storage where losing sessions on restart is acceptablenot Valkey
  • Fronting an API whose responses are costly and change slowlynot Valkey

Valkey

  • Continuing on a permissively licensed in-memory store after the Redis licence changenot Memcached
  • Caching and session storage where a foundation-governed project is a procurement requirementnot Memcached
  • Migrating from Redis without rewriting application codenot Memcached

Where each one falls short

Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Memcached

  • No persistence at all: restart a node and its cache is gone, which every design must assume
  • No replication or failover, so losing a node loses that share of the cache
  • Only simple key-value, with none of the lists, sorted sets or streams Redis offers
  • Values are capped at 1MB by default, which surprises teams caching large documents

Valkey

  • Younger project, so its track record is short even though the codebase is not
  • Divergence from Redis grows over time, so compatibility is strongest near the fork point and weakens as both evolve
  • Ecosystem tooling and documentation still frequently assume Redis, leaving translation work

Pricing, plan by plan

Memcached

Free
  • MemcachedFree
    • Full functionality
    • Self-hosted
    • No usage limits

Valkey

Free
  • ValkeyFree
    • Full functionality
    • Self-hosted
    • No usage limits

Which should you pick?

Choose Memcached if

  • You need in-memory key-value cache.
  • You want to start without paying.
  • You work on Linux, macOS, Windows, Docker, Self-hosted.
  • You also want multithreaded.

Choose Valkey if

  • You need redis-compatible.
  • You want to start without paying.
  • You work on Linux, macOS, Docker, Self-hosted.
  • You also want bsd licensed.

Questions people ask

Is Memcached or Valkey better?
Neither clearly leads. Memcached starts at Free and Valkey at Free, and user ratings are close enough to be indistinguishable. Choose on capability and platform support.
Which is cheaper, Memcached or Valkey?
Memcached starts at Free and Valkey at Free.
Does Memcached or Valkey run on more platforms?
Memcached runs on Linux, macOS, Windows, Docker, Self-hosted. Valkey runs on Linux, macOS, Docker, Self-hosted.
Can I use Memcached for free?
Both have a free tier, so you can try either at no cost before committing.
What is Memcached best used for?
Memcached is most often used for caching expensive database query results to cut load, session storage where losing sessions on restart is acceptable, fronting an api whose responses are costly and change slowly. Of those, caching expensive database query results to cut load and session storage where losing sessions on restart is acceptable are not what Valkey is typically brought in for.
What can Memcached do that Valkey cannot?
Memcached covers In-memory key-value cache, Multithreaded, Client-side sharding, Predictable memory use. Valkey covers Redis-compatible, BSD licensed, Rich data structures, Replication and persistence.

Answered from the vendors’ own pages

Memcached: Is Memcached free?

Yes, open source with no licence fee.

Valkey: Is Valkey free?

Yes, BSD-licensed open source under the Linux Foundation.

Memcached: Memcached or Redis?

Memcached is a pure cache: simpler, multithreaded and very predictable. Redis adds persistence, replication and rich data structures, which is why it is the default choice unless you specifically want a cache and nothing more.

Valkey: Why does Valkey exist?

Redis changed its licence away from BSD in 2024. Valkey is the community fork continuing under permissive terms, backed by AWS, Google Cloud and Oracle among others.

Memcached: Does Memcached persist data?

No. Everything is in memory and lost on restart, by design.

Valkey: Can I switch from Redis to Valkey?

At the fork point it is drop-in compatible with existing clients and data. The further both projects move from that point, the more you should verify the specific features you use.

Share

Related pages

Other head to heads