i’m working with Yii2 and it’s taking a little bit longer than usual when trying to find that bug… and when trying to refresh and the changes are corrected (in dev environment) it’s taking a lot of time!!!
how do i do to embrace this? i’ve read the docs but they’re quite a little bit hard…
would you give me a hand in this?
Do you mean page load time is too high?
thanks for the reply… no… i’m developing an app… and when i make a change it doesnt come up until exactly thirty long seconds… i load the page see some error i fix it and then it happen that it must wait!!! and this is a full machine for only that app… i really dont know how deactivate that feature…
I suspect this is a server caching issue. To improve system performance the server will read your source files from disk, compile the php and store the compiled version. This saves time next time that php file is run. The server may also do this for css, js and other file types. It will check to see if the source file has changed every now and then, and if it has, will flush the old version and read the new. 30 seconds is a common value.
On my development server I change the amount of time the server saves these files from 180 seconds (3 minutes) to 5 seconds. This allows me to get some benefit from the caching, but I don’t have to wait long for to see uploaded changes.
On my system, this is what I do. You system will almost certainly be different, but this might give you some ideas.
Note: This is a server configuration issue. Not a YII2 issue.
Modify opcache to check for new files every 5 seconds instead of 180 seconds
ok thanks… i’m watching the manual… http://php.net/manua...revalidate-freq
i’ll check them my php.ini file and i’ll tell you…
Ah, that’s the PHP opcode cache. You’re on the right track.