The project uses the php+nginx environment to run. Every time the code is modified, it takes a while for it to take effect, which is very annoying.
I happened to be free today, so I started to solve it. The main reason is that php caches opcodes by default.
By looking at the display results of phpinfo(), we found that there is an expiration time configuration in ZendOpcache - opcache.revalidate_freq, the default value is 60.
I opened php.ini, found opcache.revalidate_freq, and changed the value to 1 (the reason why it is not changed to 0 is to prevent opcode from being regenerated every time it is run, which will cause PHP to be less efficient when performing intensive operations, so it was changed to 1 Enough to meet my development needs)
Respect the originality, attach the link: http://www.oschina.net/question/123129_221115
The above has introduced the problem of PHP code caching, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.