mr_app
mr_app

Reputation: 1312

PHP APC exclude folder from caching

I want to exclude one folder for caching with apc. As apc-filter im using...

apc.cache_by_default=1
apc.filters="-/var/www/mysite/httpdocs/phpmyadmin/.*"

My Problem is now, that my filter not works recursivly. APC is still caching subfolders of phpmyadmin. Any ideas how i can use my filter recursivly?

Upvotes: 0

Views: 2485

Answers (2)

Neeraj
Neeraj

Reputation: 244

There are two things that you need to do in order to fix this issue

  1. Change your virtual host to disable APC for phpmyadmin:
Alias /phpmyadmin "/usr/share/phpmyadmin/"
<Directory "/usr/share/phpmyadmin/">
      AllowOverride All
      Options FollowSymlinks
      Order allow,deny
      Allow from all
      php_admin_value open_basedir "/srv/:/tmp/:/usr/share/:/etc/webapps:/usr/share/pear/"
      php_admin_value apc.enabled 0
</Directory>
  1. Add the Filter for all the phpmyadmin pages:

apc.filter="-/usr/share/phpmyadmin/.*"

Upvotes: 1

Danack
Danack

Reputation: 25701

It should just be working. There's a chance that it's not being picked up because of some funkiness with symbolic paths or how the file is being included.

Either way you could just match anything that has phpmyadmin in the filename like:

apc.filters = "-.*phpmyadmin.*"

Upvotes: 0

Related Questions