The difference between cache
##Cache is divided into local cache and distributed cache. (Recommended learning:
Redis video tutorial)
What is the difference between redis and simple map:
1.Redis can use dozens of G memory for caching, but Map cannot, and the general JVM only Dividing the data into several G is enough.
2.Redis’ cache can be persisted. Map is a memory object, and the data will be gone as soon as the program is restarted.
3.Redis can implement distributed caching. Map can only exist in the program that created it.
4.Redis can handle millions of concurrency per second and is a professional cache service, Map is just an ordinary object
5,Redis cache has an expiration mechanism, Map itself does not have this function
6,Redis has a rich API, Map is too simple
For more Redis-related technical articles, please visit theRedis database usage tutorial column to learn !
The above is the detailed content of What is the difference between redis and simple map?. For more information, please follow other related articles on the PHP Chinese website!