What is memcache?

藏色散人
Release: 2023-04-06 06:30:01
forward
3440 people have browsed it

What is memcache?

memcached is a software developed by Brad Fitzpatric of Danga Interactive, a subsidiary of LiveJournal. Now it has become an important factor in improving the scalability of Web applications in many services such as mixi, hatena, Facebook, Vox, LiveJournal and so on. Many web applications save data to an RDBMS, from which the application server reads the data and displays it in the browser.

However, as the amount of data increases and access becomes concentrated, there will be significant impacts such as increased burden on the RDBMS, deterioration of database response, and website display delays. This is where memcached comes into play. memcached is a high-performance distributed memory cache server. The general purpose of use is to increase the speed and scalability of dynamic web applications by caching database query results and reducing the number of database accesses.

Principle of combining memcached with php

What is memcache?

##memcache cache data format

memcache uses Data is saved in the form of key-value pairs. By combining it with PHP, memcahe can save variables, arrays, objects and other data into memory. Greatly improves the efficiency of server caching.

In order to improve performance, the data saved in memcached is stored in memcached's built-in memory storage space. Since data only exists in memory, restarting memcached and restarting the operating system will cause all data to disappear. In addition, after the content capacity reaches the specified value, unused caches are automatically deleted based on the LRU (Least Recently Used) algorithm. Memcached itself is a server designed for caching, so it does not consider the persistence of data too much.

Related recommendations: "

memcached tutorial"

The above is the detailed content of What is memcache?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:hcoder.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!