Blacklist a directory with Zend Opcache

拜拜、爱过 提交于 2020-01-22 17:47:06

问题


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 with Zend OPcache v7.0.4-dev


回答1:


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


来源:https://stackoverflow.com/questions/24231469/blacklist-a-directory-with-zend-opcache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!