httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Fwd: Re: 404 does not delete cached entries using mod_disk_cache]
Date Sat, 18 Jun 2005 07:14:04 GMT
Sorry for being persistent, but any news / comments on this?



-------- Original Message --------
Subject: Re: 404 does not delete cached entries using mod_disk_cache
Date: Thu, 26 May 2005 16:51:14 +0200
References: <> <>

Sander Striker wrote:
> wrote:


>> Is this behaviour intended and compliant with the RFC?
> Not to my knowlegde.  Given that mod_mem_cache and mod_disk_cache are doing
> different things is pretty much indicative that one of the two is wrong ;).

That was also my thought.

>> The reason for this behaviour is that the remove_url function of
>> mod_disk_cache is a dummy function
>> (BTW: mod_mem_cache seems to really remove the cache entry in
>> remove_url).
>> If this behaviour is not intended I would have a look into this to
>> create a patch.
> Please do!

I created a patch but the problem turned out to be more complex than I thought
originally. So a close look on the patch is definitely a good thing. Some comments:

1. I had to adjust the cache provider API for remove_url as I need the request_rec
   struct to remove the files correctly in mod_disk_cache.

2. It turned out that 404 responses are not passed down the filter chain the way I expected.
   Adjusting the default handler again proved that the changes to mod_disk_cache worked
ke any error page handling in Apache. So I tried to address
   this problem at other locations of the code. I detected two cases:

   1. Apache generated error messages or redirect to external source.
   2. Custom local error documents.

   In the first case I use the insert_error_filter hook to ensure that the CACHE_SAVE filter
   is reinserted to the filter chain if it has been inserted before during the request.

   In the second case the filter chain is run, but with the wrong URI. So I checked if there
   is a previous request (r->prev) and if it has the same status code (this happens in
a section
   where we only handle uncachable status codes). If this is the case I assume that I should
   the URL from the previous request from the cache.

So any comments / thoughts on this?



View raw message