5

I am having trouble understanding the format required by the apc.filters directive in PHP APC configuration. (particularly for more than one patterns)

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

Let's say i don't want to cache two files namely brooklyn.php and boston.php

I put the following entry:

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

It still caches

I also tried

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

Still caches

I would really appreciate if someone could write a sample expression that has multiple patterns.

nano
  • 687
  • 6
  • 16

4 Answers4

3

Wouldn't this do the trick?

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

or

apc.filters = "-/(brooklyn|boston)\.php$"
bcx
  • 81
  • 1
  • 4
2

Can't wait to see if you get any answers. I could never get the "dis-include" to work (my related question: apc.filters by path?) Only worked for me by turning off cache_by_default and +ing instead of -ing paths.

Community
  • 1
  • 1
typeoneerror
  • 55,990
  • 32
  • 132
  • 223
2

i had the same problem and finally found the way to go. You just have to remove spaces after each comma.

SirHill
  • 29
  • 2
1

this works:

apc.filters = "brooklyn.php$,boston.php$"
tbarderas
  • 55
  • 6