且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

APC-> APCu/OPCache,性能较差

更新时间:2023-02-19 23:19:35

现在,您正在检查每个更改请求上的每个文件,这可能不是生产系统上想要的.

Right now you are checking every file on every request for changes, which probably isn't what you want on a production system.

我通常只是禁用它(记住在进行更改后重新启动Web服务器):

I usually just disable it (remember to restart the web server after making changes):

opcache.validate_timestamps=0

或者,您可以尝试将频率设置为非0的值并保持启用状态:

Alternatively, you can try setting the frequency to something other than 0 and keep it enabled:

opcache.validate_timestamps=1  
opcache.revalidate_freq=300

理论上,这应该每5分钟检查一次更改.

This should theoretically only check for changes every 5 minutes.