Blacklist a directory with Zend Opcache

后端 未结 1 1197
孤街浪徒
孤街浪徒 2021-02-20 06:21

How can i tell Zend Opcache not to cache any files from a specific directory. For e.g /var/www/public_html/devzone/*

I use PHP 5.5.13

1条回答
  •  青春惊慌失措
    2021-02-20 06:51

    You should set the opcache.blacklist_filename configuration value with a file path to your blacklist.

    The location of the OPcache blacklist file. A blacklist file is a text file containing the names of files that should not be accelerated, one per line. Wildcards are allowed, and prefixes can also be provided. Lines starting with a semi-colon are ignored as comments.


    For example, create a new file:

    /etc/php5/opcache-blacklist.txt
    

    Save with your wildcard setting:

    /var/www/public_html/devzone/*
    

    And add the blacklist file path to your php.ini:

    opcache.blacklist_filename=/etc/php5/opcache-blacklist.txt
    

    0 讨论(0)
提交回复
热议问题