How do I clean up the previously cached opcode when the online PHP code is updated?

Source: Internet
Author: User
How do I clean up the previously cached opcode when the online PHP code is updated?

Reply content:

How do I clean up the previously cached opcode when the online PHP code is updated?

opcache.validate_timestampsDefault isOFF

  • Opcache sets the number of seconds per opcache.revalidate_freq to check if the script is updated. If you disable this option, you must manually reset the Opcache using the Opcache_reset () or opcache_invalidate () function, or you can make the file system changes take effect by restarting the WEB server.

opcache.revalidate_freqUnits Default to2

  • Checks whether the script timestamp has an updated period, in seconds. Setting to 0 causes Opcache to check for script updates for each request.

From official documents:
will be opcache.validate_timestamps set toTrue
will be opcache.revalidate_freq set to an appropriate value, as 30 this time is flexibly adjusted to the server pressure.

Once set, the worst-case code update takes effect 30 seconds later and takes effect as soon as you can.

OpCode has cache time, waiting for it to expire.

  • 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.