cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tagunov Anthony" <atagu...@nnt.ru>
Subject Caching + Re: AW: [C1,C2][feature request][response.setHeader["Expires","Thu, 01 Dec 1994 16:00:00 GMT");MIME-Version: 1.0
Date Fri, 26 Jan 2001 17:55:53 GMT
Hello, gentelmen!

Maybe that's a bit Off Topic, but still, I would like to stress this point:
unfortunantly in C1 when the contents of a page got cached, the headers
didn't. I beleive they should have got cached. All of them. Including the
ones in question (and even if an XSP page was doing responce.setRedirect())
this might also be appropriate to honour).

So, 
1) regular headers should get cached, this means that they shouldn't be
response.setHeader('xxx'), as the servlet API AFAIK doesn't allow
to see what headers have been set.

2) sending a redirect maybe should be considered a separete case, and
maybe if some processing chain leads Cocoon app to a conclusion that
a redirect should be sent, then this descision should also be remembered in the
cache?

On Fri, 26 Jan 2001 17:45:14 +0100, Giacomo Pati wrote:

>Carsten Ziegeler wrote:
>> > Giacomo Pati wrote:
>> > An other approach is to extend the generators to be
>> > configurable/parametrizable with headers
>> >
>> >   <map:generator name="no-cache-file" src="FileGenerator">
>> >     <header name="pragma" value="no-cache"/>
>> >     <header name="cache-control" value="no-cache"/>
>> >     <expires>+10000</expires>
>> >   </map:generator>
>> >
>> >   <map:generator name="semi-cache-file" src="FileGenerator">
>> >     <header name="pragma" value="no-cache"/>
>> >     <header name="cache-control" value="no-cache"/>
>> >     <expires>+100</expires>
>> >   </map:generator>
>> >
>> >   <map:generator name="normal-file" src="FileGenerator">
>> >   </map:generator>
>>
>> +10
>>
>> I personally like this approach, as it is usable for every pipeline
>> not only for XSP.
>> The only question I would raise: Is the generator the right place?
>> Or shouldn't it be the pipeline itself?
>> The header values are for the whole pipeline/request, so I think
>> logically they don't belong to the generator.
>> Or am I just too pedantic on this?
>
>My point is that is has nothing to do with the concern of the sitemap (it is 
>describing how requests leads to responses). The header story is IMHO the 
>concern of a generator or maybe a transformer because they deal directly with 
>the environment (and the sitemap doesn't/shouldn't)
>
>Giacomo
>
>>
>> Carsten
>>
>>

P.S. And in addition, if I'm allowed to ask, what does this semantics with
     <expires>+10000</expires>
     ...
     <expires>+100</expires>
mean? Maybe it should rather be
   <map:generator name="no-cache-file" src="FileGenerator">
     <header name="pragma" value="no-cache"/>
     <header name="cache-control" value="no-cache"/>
     <expires>-10000</expires>
     <!-- -10000, as to prevent caching we should pass an expiry date In The Past (and
deep in the
           past, in case some people might accidentially have their computers have a date
of the previous year, 
           or even later.. Should we set the date to 1950? or this will lead to browser failure?
           This could be expressed with a sytax like that:
      <expires>-inf</expires>-->
   </map:generator>

   <map:generator name="semi-cache-file" src="FileGenerator">
     <header name="pragma" value="no-cache"/>
     <header name="cache-control" value="no-cache"/>
     <expires>+100</expires>
   </map:generator>

   <map:generator name="normal-file" src="FileGenerator">
   </map:generator>

Best regards, Tagunov Anthony



Mime
View raw message