After the online php code is updated, how does one clear the previously cached opcode?

Source: Internet
Author: User
After the online php code is updated, how does one clear the previously cached opcode? After the online php code is updated, how does one clear the previously cached opcode?

Reply content:

After the online php code is updated, how does one clear the previously cached opcode?

Opcache. validate_timestampsThe default value isOFF

  • OPcache checks whether the script is updated every second specified by opcache. revalidate_freq. If this option is disabled, you must use the opcache_reset () or opcache_invalidate () function to manually reset OPcache. You can also restart the Web server to make the file system change take effect.

Opcache. revalidate_freqUnitSecondsDefault Value:2

  • Check whether the script timestamp has an update cycle, in seconds. If it is set to 0, OPcache checks the script update for each request.

From the official documentation:
SetOpcache. validate_timestampsSetTrue
SetOpcache. revalidate_freqSet to an appropriate value, as shown in figure30This time can be adjusted flexibly according to the server pressure.

After the above settings, the worst case code will take effect after 30 seconds, and will take effect immediately.

The opcode has a cache time. Wait until it expires.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.