cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: invalid caching problem
Date Fri, 16 May 2003 11:27:23 GMT

On Thursday, May 15, 2003, at 09:39 PM, Jeremy Quinn wrote:

> On Thursday, May 15, 2003, at 04:40 PM, Vadim Gritsenko wrote:
>> Jeremy Quinn wrote:
>>> If I put this in my pipeline (to reduce server load):
>>>     <map:parameter name="expires" value="access plus 120 minutes"/>
>>> then whenever:
>>>     1) the content has changed
>>>     2) I hit reload and the server sends a full 200 response
>>> changes in the source used by the file generator are ignored.
>>> If I remove that statement and trash the cache, no problem occurs.


>> I doubt that FileGenerator is resposible for this bug. Look into 
>> caching pipeline implementation.

> I looked into 
> o.a.c.components.pipeline.impl.AbstractCachingProcessingPipeline.

I am beginning to think that the behaviour of the 'expires' handling in 
this class is not quite right.

My understanding of the dynamics of HTTP Request/Response messages is 
not good enough to be sure though, can anyone put me right here?

What appears to happen in the code is that IF there is an 'expires' 
parameter set on a Pipeline, then it will NEVER refresh, regardless of 
the validity-state of the initial generated source.


Because the code compares the current-time to the current-time PLUS the 
time-clause in the Pipeline's 'expires' parameter, which will ALWAYS be 
in the future (in my case, +2 hours).

Is this the intended behaviour?

It was my understanding that the Pipeline's 'expires' parameter was 
intended to be an instruction to the Browser to cache the page 
internally for that period of time and not bother to go back to the 
Server during that period.

What fails here is when the user explicitly tells the Browser to 
Reload, because they intend to override any internal caching.

I am not sure under what circumstances a Browser sends 'freshness' data 
to the Server in it's request header, but it seems to me that the 
Pipeline should be comparing data from the Request with the 
current-time, not the Response (which in this case is static).


Using <map:parameter name="expires" value="access plus 120 minutes"/> 
in a Pipeline, permanently disables validity checking on that Pipeline.

Thanks for any feedback

regards Jeremy

View raw message