You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Matthias Epheser <ma...@gmx.at> on 2006/12/13 16:58:50 UTC

ExpiresCachingProcessingPipeline and cache-expires

Hi,

Reinhard and me are using an ExpiresCachingProcessingPipeline in one of our 
projects.

According to the documentation here 
http://cocoon.zones.apache.org/daisy/documentation/components/1063/g1/939.html 
it should be possible to declare the expires time in mod_expires style (e.g.. 
"access plus 4 ours").

After debugging a cache problem, we realised that our "access plus 4 hours" was 
overridden by the  <parameter name="cache-expires" value="180"/> default 
configuration in the cocoon-core-sitemap.xconf.

Looking into the code showed that the parameter is only initialised using a cast 
from long:

this.cacheExpires = this.parameters.getParameterAsLong("cache-expires", 
this.defaultCacheExpires);

We couldn't find something about the apache-style support here. We are using a 
2.2 development version from about early this year.

Are we missing some point or is the documentation pointing to a feature that 
doesn't exist (any more) ?

best regards,

matthias

Re: ExpiresCachingProcessingPipeline and cache-expires

Posted by Carsten Ziegeler <cz...@apache.org>.
Reinhard Poetz wrote:
> Matthias Epheser wrote:
>> Hi,
>>
>> Reinhard and me are using an ExpiresCachingProcessingPipeline in one of 
>> our projects.
>>
>> According to the documentation here 
>> http://cocoon.zones.apache.org/daisy/documentation/components/1063/g1/939.html 
>> it should be possible to declare the expires time in mod_expires style 
>> (e.g.. "access plus 4 ours").
> 
> Does the mod_expires style work for anybody?
> 
I'm not 100% sure but I think it got removed while the code was in the
sandbox. So I guess it's definitly not implemented.

Carsten
-- 
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: ExpiresCachingProcessingPipeline and cache-expires

Posted by Reinhard Poetz <re...@apache.org>.
Bertrand Delacretaz wrote:
> On 12/15/06, Reinhard Poetz <re...@apache.org> wrote:
> 
>> Matthias Epheser wrote:
>> >... it should be possible to declare the expires time in mod_expires 
>> style
>> > (e.g.. "access plus 4 ours").
>>
>> Does the mod_expires style work for anybody?..
> 
> Yes, sounds good, it's intuitive.

indeed it's a good idea but the javadocs make you think that this stuff already 
works :-/
We would like to know if it's us that do something wrong or is it the missing 
implementation.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------



	
		
___________________________________________________________ 
Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Re: ExpiresCachingProcessingPipeline and cache-expires

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 12/15/06, Reinhard Poetz <re...@apache.org> wrote:

> Matthias Epheser wrote:
> >... it should be possible to declare the expires time in mod_expires style
> > (e.g.. "access plus 4 ours").
>
> Does the mod_expires style work for anybody?..

Yes, sounds good, it's intuitive.

-Bertrand

Re: ExpiresCachingProcessingPipeline and cache-expires

Posted by Reinhard Poetz <re...@apache.org>.
Matthias Epheser wrote:
> Hi,
> 
> Reinhard and me are using an ExpiresCachingProcessingPipeline in one of 
> our projects.
> 
> According to the documentation here 
> http://cocoon.zones.apache.org/daisy/documentation/components/1063/g1/939.html 
> it should be possible to declare the expires time in mod_expires style 
> (e.g.. "access plus 4 ours").

Does the mod_expires style work for anybody?

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------



	
		
___________________________________________________________ 
Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de

Re: ExpiresCachingProcessingPipeline and cache-expires

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Gianugo Rabellino wrote:
> On 12/13/06, Matthias Epheser <ma...@gmx.at> wrote:
> 
>> According to the documentation here
>> http://cocoon.zones.apache.org/daisy/documentation/components/1063/g1/939.html 
>>
>> it should be possible to declare the expires time in mod_expires style 
>> (e.g..
>> "access plus 4 ours").
> 
>> We couldn't find something about the apache-style support here. We are 
>> using a
>> 2.2 development version from about early this year.
>>
>> Are we missing some point or is the documentation pointing to a 
>> feature that
>> doesn't exist (any more) ?
> 
> Definitely a documentation bug. I wrote that piece of code, and the
> corresponding docs, then the Apache style was dropped sometimes in the
> process (I found it out the hard way as well, but it was definitely
> too late at night to fix the docs). Probably, as Carsten notes, this
> happened when the component was moved from the sandbox.

There is AbstractProcessingPipeline.parseExpires() which is used to initialize 
configuredExpires member variable. Not sure what's up with 
ExpiresCachingProcessingPipeline and why it is not using this value and/or method.

Vadim


Re: ExpiresCachingProcessingPipeline and cache-expires

Posted by Gianugo Rabellino <gi...@apache.org>.
On 12/13/06, Matthias Epheser <ma...@gmx.at> wrote:

> According to the documentation here
> http://cocoon.zones.apache.org/daisy/documentation/components/1063/g1/939.html
> it should be possible to declare the expires time in mod_expires style (e.g..
> "access plus 4 ours").

> We couldn't find something about the apache-style support here. We are using a
> 2.2 development version from about early this year.
>
> Are we missing some point or is the documentation pointing to a feature that
> doesn't exist (any more) ?

Definitely a documentation bug. I wrote that piece of code, and the
corresponding docs, then the Apache style was dropped sometimes in the
process (I found it out the hard way as well, but it was definitely
too late at night to fix the docs). Probably, as Carsten notes, this
happened when the component was moved from the sandbox.

-- 
Gianugo Rabellino
Sourcesense, making sense of Open Source: http://www.sourcesense.com
Orixo, the XML business alliance: http://www.orixo.com
(blogging at http://www.rabellino.it/blog/)