Syntax php apc.filters

I'm having trouble understanding the format required by the apc.filters directive in the PHP APC configuration. (especially for several models)

manual says "A comma separated list of extended POSIX regular expressions."

Say I don’t want to cache two files, namely brooklyn.php and boston.php

I posted the following entry:

apc.filters = "-(.*)/brooklyn\.php$, -(.*)/boston\.php$"

It still caches

I also tried

apc.filters = "-(.*)/brooklyn\.php$", "-(.*)/boston\.php$"

Saving Caches

I would really appreciate if anyone could write a sample expression with multiple patterns.

+5
source share
4 answers

Isn't that a trick?

apc.filters = "-/brooklyn\.php$,-/boston\.php$"

or

apc.filters = "-/(brooklyn|boston)\.php$"
+3
source

, , . "dis-include" ( : apc.filters ?) , cache_by_default + .

+2

I had the same problem and finally found the way. You just need to remove the spaces after each comma.

+2
source

it works:

apc.filters = "brooklyn.php$,boston.php$"
+1
source

All Articles