tags:

views:

346

answers:

2

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.

A: 

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

Typeoneerror
A: 

Wouldn't this do the trick?

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

or

apc.filters = "-/(brooklyn|boston)\.php$"
bcx