How do I clean up the previously cached opcode when the online PHP code is updated?
Reply content:
How do I clean up the previously cached opcode when the online PHP code is updated?
opcache.validate_timestamps
Default isOFF
Opcache sets the number of seconds per opcache.revalidate_freq to check if the script is updated. If you disable this option, you must manually reset the Opcache using the Opcache_reset () or opcache_invalidate () function, or you can make the file system changes take effect by restarting the WEB server.
opcache.revalidate_freq
Units 秒
Default to2
From official documents:
will be opcache.validate_timestamps
set toTrue
will be opcache.revalidate_freq
set to an appropriate value, as 30
this time is flexibly adjusted to the server pressure.
Once set, the worst-case code update takes effect 30 seconds later and takes effect as soon as you can.
OpCode has cache time, waiting for it to expire.