Skip to content
Devgo

Redis vs Memcached

Two in-memory caches. Redis offers rich data types, persistence, replication, and pub/sub (single-threaded per core); Memcached is simpler, multithreaded, strings-only, and intentionally ephemeral. Both are excellent; the choice is about features vs simplicity.

Data types

Redis
Strings, hashes, lists, sets, sorted sets, streams, HyperLogLog.
Memcached
Strings only.

Persistence

Redis
Optional RDB snapshots + AOF.
Memcached
None by design (pure cache).

Replication/HA

Redis
Cluster sharding + + Sentinel.
Memcached
None by design; client hashing across nodes.

Throughput per node

Redis
Single-threaded per core; cluster to scale.
Memcached
Multithreaded; saturates a multi-core box for plain GET/SET.

Use as more than cache

Redis
Queues, rate limiting, , leaderboards.
Memcached
Caching only.
When Redis wins
  • You need data structures, persistence, , or .
  • You want one tool for cache + lightweight queue + rate limiting.
When Memcached wins
  • You want the simplest, fastest pure cache with no extra features.
  • Multithreaded throughput on a single node matters more than data types.

Verdict

Default to for its versatility; choose when you want a deliberately minimal, multithreaded pure cache and nothing more.