title: If redis is already a part of the stack, why is Memcached still used alongside Redis?
body: <p>Redis can do everything that Memcached provides (LRU cache, item expiry, and now clustering in version 3.x+, currently in beta) or by tools like twemproxy. The performance is similar too. Morever, Redis adds persistence due to which you need not do cache warming in case of a server restart.</p>
  <p>Reference to some old answers which compare Redis and Memcache, some of which favor Redis as replacement of Memcache (if already present in the stack):</p>
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/10558465/memcache-vs-redis">Memcached vs. Redis?</a></p>
  </li>
  <li><p><a href="https://stackoverflow.com/questions/2873249/is-memcached-a-dinosaur-in-comparison-to-redis">Is memcached a dinosaur in comparison to Redis?</a></p>
  </li>
  <li><p><a href="https://stackoverflow.com/questions/4188620/redis-and-memcache-or-just-redis">Redis and Memcache or just Redis?</a></p>
  </li>
  </ul>
  <p>In spite of this, on studying stacks of large web scale companies like Instagram, Pinterest, Twitter etc, I found that they use both Memcached and Redis for different purposes, not using Redis for primary caching. The primary cache is still Memcached, and Redis is used for its data structures based logical caching.</p>
  <p>As of 2014, why is memcached still worth the pain to be added as additional component into your stack, when you already have a Redis component which can do everything that memcached can? What are the favorable points that incline the architects/engineers to still include memcached apart from already existing Redis?</p>
  <h1>Update :</h1>
  <p>For our platforms, we have completely discarded Memcached, and use redis for plain as well as logical caching requirements. Highly
  performant, flexible and reliable.</p>
  <p>Some example scenarios:</p>
  <ul>
  <li>Listing all cached keys by a specific pattern, and read or delete their values. Very easy in redis, not doable ( easily ) in memcached.</li>
  <li>Storing a payload more than 1mb, easy to do in redis, requires slab size tweaks in memcached, which has performance side effects of its own.</li>
  <li>Easy snapshots of current cache content</li>
  <li>Redis cluster is production ready as well along with language drivers,hence clustered deployment is easy too.</li>
  </ul>