Memcache: Memcached is a free and open source code, high-performance, distributed memory object cache system. It can be used to accelerate dynamic web applications and reduce database load. By maintaining a unified and huge hash table in the memory, you can store data in various formats, including images, videos, files, and database query results. Memcache here is different from memcache in php. memcache in php is supported by php, while memcached is a service.
Memcache introduction:
Memcached is a free and open source code, high-performance, distributed memory object cache system. It can be used to accelerate dynamic web applications and reduce database load. By maintaining a unified and huge hash table in the memory, you can store data in various formats, including images, videos, files, and database query results.
Here, memcache should be different from memcache in php. memcache in php is supported by php, while memcached is the master program file of the server, and the server installation program. if you want to use memcache to cache the system, both memcache and memcached must be installed. Memcache is a memory cache that caches frequently accessed data or objects in the memory. The data cached in the memory is accessed through APIs, the data is like a large hash table. by caching common data or objects, the database load is reduced and the website response speed is improved. In general, the client sends a request to reach memcache. if the requested data exists in memcache, the request data is directly returned without any operations on the data. If the requested data does not exist in memcache, query the database, return the data obtained from the database to the client, and cache the data to memcache. The data in memcache is updated at the same time as the database is updated to ensure that the data in memcache is consistent with the data in the database.
Simple principle of memcache