Alternative PHP Cache
(APC)是 PHP 的一个免费公开的优化代码缓存。它用来提供免费,公开并且强健的架构来缓存和优化 PHP 的中间代码。
安装方法:
1 | wget http://pecl.php.net/get/APC-3.1.9.tgz |
配置php.ini
1 | vi /usr/local/php/lib/php.ini |
[APC]
extension = “/usr/local/php/lib/php/extensions/no-debug-zts-20090626/apc.so”
apc.enabled = 1
apc.cache_by_default = on
apc.shm_segments = 1
apc.shm_size = 32M
apc.ttl = 600
apc.user_ttl = 600
apc.num_files_hint = 0
apc.write_lock = On1
2
然后重启Apache
service httpd restart`