Memcache is an open-source, high-performance distributed memory object caching system that reduces database access, improves application access and reduces database load in applications. In order to provide high-speed data lookup capability in memory, Memcache stores and accesses data in the form of key-value, maintaining a huge hashtable in memory, and the time complexity of finding data is reduced to O (1), guaranteeing high-speed access to data. Because the size of the memory is limited, when there is not too much space in memory to store the new data, Memcache uses the LRU (Least recently used) algorithm to eliminate the least recently unused data to make room for the new data. The Memcache client and the server communicate by building the Memcache protocol on top of the TCP protocol, which supports two kinds of data transfer, the two of which are text lines and unstructured data, respectively. Text line : The command that is used primarily to host the client and the response from the server side. non-institutional data : used primarily for client and server-side data transfer. Memcache itself is not a distributed cache system, his distribution is mainly by accessing his client to achieve.
Distributed Cache-memcache Definition