The differences between Redis and Memcache are: 1. Different storage methods; 2. Different data support types; 3. Different underlying models. Memcache stores all data in memory, and the data cannot exceed the memory size; while redis stores part of the data on the hard disk.
What are the differences between Memcache and Redis?
(Recommended learning: redis tutorial)
1. Storage method
Memcache stores all data in the memory and will hang up after a power outage. , the data cannot exceed the memory size.
Redis is partially stored on the hard disk, which ensures data persistence.
2. Data support types
Memcache’s support for data types is relatively simple.
Redis has complex data types.
3. Use different underlying models
The underlying implementation methods and application protocols for communication with clients are different. Redis directly built its own VM mechanism, because if the general system calls system functions, it will waste a certain amount of time to move and request.
The above is the detailed content of What are the differences between Redis and Memcache?. For more information, please follow other related articles on the PHP Chinese website!