You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hasson Yehudit <Ye...@comverse.com> on 2006/11/05 09:43:35 UTC
[users@httpd] garbage collection mechanism with mod proxy
Hi,
I am working with apache 1.3.27 with mod proxy.
I checked the garbage collection mechanism with the following
configuration:
CacheRoot "/var/cti/db/apache"
CacheSize 10
CacheGcInterval 0.2
CacheMaxExpire 1
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1
#########################################
I did the following tests:
On time 0 : sent a request to file 1 (4kb) - the file was stored in
the cache
On time 8 : sent a request to file 2 (4kb) - the file was stored in
the cache
On time 9 : sent a request to file 3 (4kb) - the file was stored in
the cache
On time 13 : sent a request to file 4 (4kb) - the entire files were
removed from cache, and file 4 was not stored
On time 14 : sent a request to file 4 (4kb) - the file was stored in
the cache (the process repeated itself)
This process seems wrong to me, because according to the documentation
the GC should work as following :
* new request arrives
* apache determines if garbage collection needs to occur (
"garbage_now < lastcheck + every", where garbage_now is the current
time, lastcheck is the time of the last garbage collection, and every is
the gcinterval)
* if garbage collection needs to happen:
* apache sorts files according to expiration date
* if file is expired, then it is removed from the cache
* if cache is still too big, remove oldest files until we get down
to the configured CacheSize
Can someone explain to me what's wrong?