Memcached: is a high-performance distributed memory cache server, essentially a memory Key-value database, but does not support data persistence, the server shuts down, the data is all lost. Only the KEY-VALUE structure is supported.
Redis: Put most of your data in memory and support data types: strings, hash tables, linked lists, collections, ordered collections, and related operations based on these data types. Redis internally uses a Redis object to represent all keys and value.
Their difference: 1) Not all data in Redis is stored in memory all the time, which is the biggest difference compared to memcached. 2) Redis not only supports simple key-value-type data, but also supports strings, hash tables, linked lists, collections, and ordered collections. 3) Redis supports data backup, which is a backup of Master-slave mode. 4) Redis support data persistence, can save in-memory data on the disk, reboot can be loaded into memory again when the use. After the Memcached server shuts down, data is lost. 5) After memcached hangs, data cannot be recovered and Redis data is lost after AOF recovery (disaster recovery).
Memcached and Redis differences