SaveMyCert
Cloud basics

Redis vs Memcached: which in-memory cache should you pick?

Redis and Memcached are both popular in-memory stores used to speed up applications by keeping frequently accessed data close at hand, but they are not equivalent tools: Memcached is a simple, multi-threaded key-value cache, while Redis is a richer in-memory data store that happens to work brilliantly as a cache but also offers data structures, persistence and replication that go well beyond caching alone. The right pick depends on whether you need “just a cache” or something more.

The shared idea: in-memory speed

Both tools keep data in memory rather than on disk, which is what makes them fast — our what is caching explainer covers why storing a copy of expensive-to-fetch data in a quick location pays off. Both Redis and Memcached are also offered as managed services through Amazon ElastiCache, so on AWS you rarely need to run either one yourself; the platform handles provisioning and operations either way.

Memcached: simple, multi-threaded, pure caching

Memcached does one job and does it well: it stores key-value pairs in memory and lets you get and set them quickly, with nothing more elaborate than that. It is multi-threaded, meaning a single Memcached instance can use multiple CPU cores to handle requests in parallel, which suits simple, high-volume caching workloads where the values themselves are simple strings or blobs of data. There is no persistence, no built-in replication, and no complex data types — restart it and the cache is empty, which is fine because a cache, by definition, is not the source of truth.

Redis: more than a cache

Redis can be used exactly like Memcached — as a simple key-value cache — but it also supports richer data structures such as lists, sets, sorted sets and hashes, which let an application do more sophisticated things directly in the cache layer, like maintaining a leaderboard or a queue. Redis also offers optional persistence (writing data to disk so it can survive a restart), built-in replication for high availability, and a publish/subscribe messaging feature. That extra capability means Redis is often used not just as a cache but as a lightweight primary data store for certain workloads.

Simple cache vs feature-rich data store

The cleanest way to frame the choice is capability versus simplicity. Memcached is deliberately minimal, which makes it easy to reason about and to scale horizontally for pure caching. Redis carries more features, which is a genuine advantage when you need them — data structures, persistence, replication — but is unnecessary complexity if all you want is a straightforward cache. Neither is “outdated”; they represent two different design philosophies that both remain in active use.

When to choose which

Choose Memcached when your need really is just a simple cache for simple values and you want to take advantage of straightforward multi-threaded scaling. Choose Redis when you want data structures beyond plain key-value pairs, need the cached data to survive a restart, want replication for resilience, or want to use the same store for light messaging or session data alongside caching. Worth noting: Valkey is an open-source fork of Redis that emerged after a licensing change, and it is a drop-in-compatible option some teams now use instead of Redis itself — the caching concepts described here apply to it equally.

  • Data model — Memcached: simple key-value only. Redis: key-value plus lists, sets, sorted sets, hashes.
  • Persistence — Memcached: none, memory only. Redis: optional, can persist to disk.
  • Replication — Memcached: none built in. Redis: built-in replication support.
  • Threading — Memcached: multi-threaded. Redis: traditionally single-threaded per instance (with some multi-threaded I/O improvements).
  • Best fit — Memcached: pure, simple caching at scale. Redis: caching plus richer data needs, session stores, light messaging.
Ready to start studying — free?

Original practice questions, timed mock exams and revision notes. No card, nothing to pay.

Jump straight into an exam
DVA-C02SAA-C03

Questions, answered

Neither is universally better — Memcached is a simple, multi-threaded key-value cache, while Redis is a richer in-memory data store with data structures, persistence and replication. Redis suits workloads that need more than plain caching; Memcached suits workloads that need exactly that and nothing more.

Sources

Exam details in this post come from the vendor's published exam guide, which is the authority on what is tested and how.

Keep reading

Cloud basics
What is a data lakehouse?
Cloud basics
What is a DDoS attack?
Cloud basics
What is a managed service in the cloud?
Cloud basics
What is multi-factor authentication (MFA)?