: This article mainly introduces php code caching. if you are interested in the PHP Tutorial, refer to it. The project runs in a php + nginx environment. it takes a while to change the code to take effect.
Today, we are free to solve the problem. The main reason is that php caches opcode by default.
View the display result of phpinfo () and find that there is an expiration time configuration in ZendOpcache-opcache. revalidate_freq. the default value is 60.
I open php. ini, find opcache. revalidate_freq: change the value to 1 (the reason why it is not changed to 0 is to prevent re-generation of opcode for each run, resulting in a decrease in the efficiency of intensive computation in php, change to 1 to meet my development needs)
Respect for originality, with links: http://www.oschina.net/question/123129_221115
The above introduces the php code cache problem, including some content, and hopes to help friends who are interested in the PHP Tutorial.