cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upayavira">
Subject Re: Last-Modified and If-Modified-Since on pipelines
Date Sun, 20 Apr 2003 10:18:38 GMT
On 19 Apr 2003 at 13:08, Miles Elam wrote:

> I added a last modified (long value) property to the CachedResponse
> object so that the environment and servlet engine could respond to
> If-Modified-Since headers and reduce network traffic.  The idea being
> that the cached response, a byte array, comprised the last valid
> timestamp for the entire matcher/request.  It doesn't apply to any
> specific resource in the pipelines and matchers and so has no
> component author-accessible methods and is immutable.
> I've only tested it on the default front welcome page (simple 
> XML->XSLT->XHTML) with wget, but it seems to work just fine.  The
> first access doesn't set Last-Modified just as it doesn't set
> Content-Length;  The stream wasn't buffered on the first access. 
> However, all subsequent accesses have the header, and if the client
> sends an If-Modified-Since header, a 304 with no body is sent
> correctly.  Changing any piece of the pipeline correctly invalidated
> the cache and regenerated the CachedResponse object (with a new
> timestamp), so no regressions in that case that I can see.
> Simple patches but one that folks behind a proxy or limited bandwidth
> line might appreciate.

Curious - but I was starting to look into how to do exactly the same thing just before 
getting your message. I'd be very interested in getting 'ifModifiedSince' behaviour out 
of a pipeline, as it'll mean that the CLI can find out whether to generate a page or not.

Unfortunately, I go on holiday in 6 hours time, so I won't get a chance to try your patch

out for three weeks :-(

Regards, Upayavira

View raw message