14. What is a key difference between Memcached and Redis?
- Memcached supports sorted sets and streams
- Redis cannot be used as a cache
- Memcached uses 16,384 hash slots
- Redis offers rich data structures, replication and optional persistence; Memcached is a simple key-value cache
Show answer
Answer: Redis offers rich data structures, replication and optional persistence; Memcached is a simple key-value cache
Redis is a data-structure server with replication and persistence; Memcached focuses on simple caching.
Lesson: Redis, Memcached and Cache Clusters
15. What is the main drawback of an in-process cache in a service with ten instances?
- It is slower than Redis
- It cannot have a TTL
- Each instance holds its own copy, so instances can briefly serve different values
- It requires a database
Show answer
Answer: Each instance holds its own copy, so instances can briefly serve different values
Per-instance copies can diverge after updates until TTLs expire or invalidations arrive.
Lesson: In-Process and Two-Level Caches