I have one virtual server with 2 installations of drupal. One is for testing purposes. Is it possible to restrict usage of APC to certain directories only, so the testing page won't eat the same amount of resources as production site? My files are installed on server like this:
data/web/mydomain.com/web - I want to use apc here.
data/web/mydomain/sub/test - I do not want to use apc.
Thank you
To answer your specific question: Is it possible to restrict usage of APC to certain directories only? Yes.
Use the apc.filters
directive in your apc.ini
file:
A comma-separated list of POSIX extended regular expressions. If any pattern matches the source filename, the file will not be cached. Note that the filename used for matching is the one passed to include/require, not the absolute path. If the first character of the expression is a + then the expression will be additive in the sense that any files matched by the expression will be cached, and if the first character is a - then anything matched will not be cached. The - case is the default, so it can be left off.
So, to exclude the testing directory, add the following to your apc.ini file and restart apache:
apc.filters = "-/data/web/mydomain/sub/test/.*"