Comparison

Redis vs Memcached

Both keep data in memory, but Redis does far more than plain caching. When is Memcached enough?

AspectRedisMemcached
Data modelStrings, hashes, lists, sets, sorted sets, streams, bitmapsOnly key and value (bytes)
PersistenceYes: RDB snapshots and AOF logNone, the cache is empty after a restart
ThreadingCommand execution is single-threaded, I/O can be multi-threadedMulti-threaded, scales across cores on one node
ClusteringBuilt-in Redis Cluster with sharding and replicasClient-side sharding, no replication
Ops complexityHigher: memory, persistence, failoverLow: install and forget
LicenseBSD up to 7.2, then RSALv2/SSPLv1, Redis 8 added AGPLv3; Valkey fork (BSD)BSD-3-Clause
EcosystemHuge: queues, rate limiting, pub/sub, sessions, licensed modulesNarrow but stable and simple
Best forCache plus data structures, queues, counters, sessionsPure high-volume cache with simple logic

Choose Redis when

  • You need more than strings: counters, leaderboards, queues, locks.
  • The cache must survive a restart or you need a replica.
  • You want one tool for cache, sessions and rate limiting.

Choose Memcached when

  • You only need a simple cache of strings or serialized objects.
  • Using all cores of one large node matters.
  • You do not want to manage persistence and failover.

Bottom line

For most new projects pick Redis (or Valkey if the license matters): it covers caching and a lot more. Memcached remains a solid choice for a pure cache where simplicity wins.

Compared

Logos belong to their owners and are used for identification only. Icons: Simple Icons (CC0), Devicon (MIT).