Search code examples
phpregexapc

apc.filters, How to include multiple directory


Can anyone help me with this?

I want set APC to cache ony two directory:

I was trayed something like this:

apc.cache_by_default = 0
apc.filters = "+/var/www/test/.*, +/var/www/test2/.*";

But this cashe ony "test" directory, not test2.


Solution

  • You need to remove spaces after each comma.

    apc.filters = "+/var/www/test/.*,+/var/www/test2/.*";
    

    You could simply use the following here.

    apc.filters = "+/var/www/(test|test2)/.*";