Home  >  Article  >  Backend Development  >  ZendCache makes your site fly_PHP Tutorial

ZendCache makes your site fly_PHP Tutorial

WBOY
WBOYOriginal
2016-07-20 11:04:52902browse

The transmission efficiency of commercial application websites is very important. Usually on some e-commerce sites, the server's response speed determines its service quality, and the server's load determines its maximum customer access capacity. Technicians are always looking for ways to improve server response speed as much as possible. ZendCache is also an excellent product developed to improve the response speed of the server. Data proves that using ZendCache can increase the server's response speed to more than 300% of the original.
1. What is ZendCache?
Let’s first look at how php runs. After a request php script is sent to the server, the server searches for the corresponding file from the disk, first compiles the script, then executes it, and finally sends the result. . The time spent consists of finding files + opening files + reading files + compiling files. ZendCache is a high-speed Cache for PHP scripts. It can store the compiled results of the PHP script file just executed in the memory of the Web server. If someone requests this page again next time, it can send it out quickly. This eliminates the time it takes for the server to compile the script every time the user requests a php file. At the same time, the time spent searching and reading PHP files from the disk is eliminated. Therefore, the corresponding speed of the server can be greatly improved.
Currently ZendCache can only run on Linux (glibc 2.1), Solaris 2.6 or above, FreeBSD 3.4 and 4.0. Unfortunately, it currently does not support Windows systems.
2. Install and use ZendCache
Register a user on zend.com, log in to zend.com as this user, and then download from the following address http://www.zend.com/store/products/zend- cache.php. Since zendCache is a software that requires membership fees, we can only download a trial version with a limited date that can be used for 30 days. However, it is a fully functional software package. Give it a try and you can experience its powerful features. To download its trial version, directly select "Test drive available" to download.
The entire download is divided into three steps. The first step is to download the ZendCache software package and directly select the software package for the corresponding platform from "Supported Platforms". Pay attention to the platforms for which the software is applicable and the corresponding PHP version and class library type.
The second step is "Request Product License", which is to obtain authorization from zend.com and require the user to provide the Host ID of his machine, which is the MAC address of the computer's network card. zend.com provides a read host network card address Tools, users can download a small program called lmutil.Z from zend.com, decompress it and execute it to obtain the computer's network card address. Execution method:
# ./lmutil lmhostid
to obtain the host ID. In addition, users can also find the MAC address of the network card from /var/log/messages.
Enter this ID number into the license application form, select "request", and then wait patiently. Zend.com will send you an email within 48 hours to notify you that you can download your own license. After receiving the email, go directly to http://www.zend.com/store/pickup.php to download. The License is a file named zend_cache.dat.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445174.htmlTechArticleFor commercial application websites, its transmission efficiency is very important. Usually on some e-commerce sites, the server The response speed determines its service quality, and the server load determines it...
Statement:
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