Neil Gunton wrote:
Neil Gunton wrote:
It seems like this might have something to do with mod_deflate, which I am using in combination with mod_disk_cache. This page gives a clue that there might be a problem with the way files are cached when these modules are both enabled:

http://www.digitalsanctuary.com/tech-blog/general/apache-mod_deflate-and-mod_cache-issues.html

I have just been doing some experimentation on my development workstation. It seems that with mod_deflate enabled, mod_cache doesn't cache properly, or at least not as I would expect: I tested with two browsers (Mozilla and Opera), both with no cookies related the site, and loading the same page from each. Both requests were passed through to the back-end, i.e. were cached separately. This is with mod_deflate enabled for html pages. So I disabled mod_deflate (just commented out that one line), restarted the servers, cleared the caches of both browsers and mod_cache, and tried again. This time, the first request was passed through to the backend (as expected), but the second request, from the other browser for the same page, was this time retrieved from mod_cache. Also, the cache directories on the server end look a lot simpler, I guess because the Vary header is no longer being set by mod_deflate. This is very interesting, I'm going to do some more testing on the production server, by clearing the mod_disk_cache cache and disabling mod_deflate for a while to see how things run. I know the content transmitted will be larger and thus slower for people on slow connections, but right now I'm interested in seeing how this affects the performance of htcacheclean, and even du - see if times for traversing the directories gets much better without all those extra Vary subdirs. In any case, it would seem that the cache wasn't really working after all, which might explain the large number of cache directories - multiple versions of the same content. Yikes.

Neil

Reply via email to