APC Introduction
The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.
APC Official Website: http://www.php.net/manual/en/book.apc.php
Windows under the latest version of: http://downloads.php.net/pierre/
Download link: The http://downloads.php.net/pierre/php_apc-3.1.4-5.3-VC6-x86.zip uses the corresponding DLL based on your PHP build
APC Configuration
APC configuration mainly describes the configuration in windows. There are many articles on configuration in linux.
1. Download php_apc.dll to the PHP ext directory.
2. Modify php. ini to add extension = php_apc.dll
Add configuration items at the end of php. ini
; APC Setting
[APC]
; An error will be reported when stat is enabled.
; Apc. stat = 0
Apc. enabled = "1 ″
Apc. shm_segments = "1 ″
The problem here is that the default memory configuration for Windows 7 is changed. Do you know if you have any problems?
; Apc. shm_size = "128 ″
; Apc. ttl = 7200
; Apc. user_ttl = 7200
; Corrected metric data
Apc. ttl = "300 ″
Apc. user_ttl = "300 ″
Apc. num_files_hint = "1024 ″
Apc. mmap_file_mask = "E:/Wamp/tmp/apc. XXXXXX"
Apc. enable_cli = "1 ″
3. Restart the apache server and check whether the apc configuration item exists in phpinfo. If yes, the configuration is successful.
APC control panel, control files from APC-3.1.4.tgz
Before cache is used
After cache is used
FAQs:
1. What is the cache Clearing Problem for OPCode under fcgi?