关闭。这个问题需要debugging details .它目前不接受答案。
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将帮助其他人回答问题。
2年前关闭。
Improve this question
有人帮忙吗?当我启用opcache时,我不应该在每次更新代码时重新启动php-fpm吗?我没有重新启动它,但我的新代码正在立即运行。
这是我的 opcache 设置:https://ibb.co/rkvTcyk
谢谢
最佳答案
你有 opcache.validate_timestamps
启用。从文档:
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 viaopcache_reset()
,opcache_invalidate()
or by restarting the Web server for changes to the filesystem to take effect.
正如你有一个
opcache.revalidate_freq
的 2
您的服务器将每 2 秒检查一次文件的更新。
关于php - 如果 opcache 是打开的,为什么我的新代码即使没有任何 php-fpm 重启也能工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58335163/