Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php apc.filters syntax

Tags:

php

apc

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.

like image 331
nano Avatar asked Dec 02 '09 17:12

nano


2 Answers

Wouldn't this do the trick?

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

or

apc.filters = "-/(brooklyn|boston)\.php$"
like image 51
bcx Avatar answered Oct 11 '22 20:10

bcx


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.

like image 31
typeoneerror Avatar answered Oct 11 '22 18:10

typeoneerror