Accelerated Access to apache + php + memcached + mysql

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.