httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: svn commit: r1021946 - /httpd/httpd/trunk/modules/cache/mod_cache.c
Date Sat, 16 Oct 2010 11:01:12 GMT
On 16 Oct 2010, at 7:22 AM, Ruediger Pluem wrote:

>> It's because if we don't do this, the very first user who sends
>> "Cache-Control: no-cache" will cause the entry to become invalidated,
> Hm. Invalidated? We might have no stale entry, so what I am asking  
> about is the
> case of a fresh 5xx response with no previous stale entry. Why do we  
> remove
> cache->remove_url_filter in this case?

The url_filter's job is to invalidate and physically remove the  
existing entry. We add the url_filter very early on, and then when  
we're certain we have no need to remove the existing entry, we remove  
the filter.

The cache->stale_handle value doesn't tell us whether a stale entry is  
present or not. Instead, it tells us that when we tried to open the  
existing entry, and we looked at the headers in the entry, and the  
headers provided by the client, we eventually concluded that in this  
specific case, we should consider the content stale. If the client  
said "Cache-Control: no-cache", we wouldn't have even tried to open  
the existing file at all, and cache->stale_handle would always be NULL.


View raw message