@
sagaxu php7.1 开始内置代码的 cache 了,改 php 文件是没用的,改完文件得重启 fpm 进程才能生效,这个应该是性能增强带来的副作用。在需要重启服务以后,php 的新版本手动部署,已经跟 java 或者 go 没有不同了。
-----
非也非也。
http://php.net/manual/en/intro.opcache.php :
This extension is bundled with PHP 5.5.0 and later, and is » available in PECL for PHP versions 5.2, 5.3 and 5.4.
http://php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq :
opcache.validate_timestamps boolean
If enabled, OPcache will check for updated scripts every opcache.revalidate_freq seconds. When this directive is disabled, you must reset OPcache manually via opcache_reset(), opcache_invalidate() or by restarting the Web server for changes to the filesystem to take effect.
opcache.revalidate_freq integer
How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.
This configuration directive is ignored if opcache.validate_timestamps is disabled.