Get the most out of your Centmin Mod LEMP stack
Become a Member

Zend opcache

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Apr 24, 2020.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,858
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    2:52 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello

    Is there a config setting in PHP opcache to have it drop the cache based on file modification time?

    *Edit:

    I just found the: opcache.revalidate_freq

    all good :)
     
    Last edited: Apr 24, 2020
  2. noly

    noly Member

    98
    16
    8
    Jul 24, 2017
    Germany
    Ratings:
    +28
    Local Time:
    1:52 PM
    1.18.x
    10.2.x
    You can switch off zend opcache for specified domains too.

    To do so add this line to "/etc/centminmod/php.d/zendopcache.ini"

    Code (Text):
    opcache.blacklist_filename=/etc/centminmod/_noCacheDomains.txt


    Then create the file "/etc/centminmod/_noCacheDomains.txt" and add

    Code (Text):
    ; Matches a specific file.
    ;/home/nginx/domains/_DOMAIN_/broken.php
    ;
    ; A prefix that matches all files starting with x.
    ;/home/nginx/domains/_DOMAIN_/public/x
    ;
    ; A wildcard match.
    ;/home/nginx/domains/_DOMAIN_/public/*-broken.php
    ;
    ; All files in folder
    ;/home/nginx/domains/_DOMAIN_/public/*
    ;
     
    Last edited: Apr 25, 2020
  3. eva2000

    eva2000 Administrator Staff Member

    45,441
    10,312
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,994
    Local Time:
    10:52 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    see linked quote below at Wordpress - Planning to add Wordpress OpCache Plugin to centmin.sh menu option 22 installs