The API does not return the latest data when opcache is enabled by php7.

problem description

PHP7+MySQL program, which provides an interface to return a value. When opcache is enabled, the interface is accessed immediately after the data is updated, and sometimes the latest data cannot be returned

the environmental background of the problems and what methods you have tried

try to shut down opcache,. The access interface can return the latest data immediately after each update

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

expect to enable opcache, but ensure that you can get the latest data every time

May.22,2021

Please restart php-fpm and try


then you can restart apache every time. You can preview the data update in real time

Menu