You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Thorsten Scherler <sc...@gmail.com> on 2012/05/02 12:45:14 UTC

c3 caching

Hi all,

I am trying to implement caching in our app. Since most of the 
components of c3 are not cache-able yet we are trying to use "expires". 
However to be forced to set a "expires-cache-key" is a complete show 
stopper, since it forces us to nearly put each match in a pipeline tag.

Further wildcard matches are not possible to cache this way since the 
"expires-cache-key" needs to contain the wildcard to be unique, 
otherwise you will get the first cached doc.

Any thoughts on it?

I am hacking CachingPipeline ATM to try to omit "expires-cache-key" and 
generate it dynamically if not set.

salu2

-- 
Thorsten Scherler<scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/


Re: c3 caching

Posted by Thorsten Scherler <sc...@gmail.com>.
On 05/02/2012 12:45 PM, Thorsten Scherler wrote:
> Hi all,
>
> I am trying to implement caching in our app. Since most of the 
> components of c3 are not cache-able yet we are trying to use 
> "expires". However to be forced to set a "expires-cache-key" is a 
> complete show stopper, since it forces us to nearly put each match in 
> a pipeline tag.
>
> Further wildcard matches are not possible to cache this way since the 
> "expires-cache-key" needs to contain the wildcard to be unique, 
> otherwise you will get the first cached doc.
>
> Any thoughts on it?

I mean

<map:pipeline expires="2" expires-cache-key="some-key">
<map:match pattern="expires/caching-pipeline/on">
<map:generate type="timestamp-noncaching" />
<map:serialize type="xml" />
</map:match>
</map:pipeline>

is fine but if I need

<map:pipeline expires="200" expires-cache-key="myKey">
<map:match pattern="expires/**">
<map:generate src="{map:1}" />
<map:serialize type="xml" />
</map:match>
</map:pipeline>

Then expires/xxx will return the same as expires/666 in case the latest 
come in the expire range. What is the c3 way to configure caching?

salu2

-- 
Thorsten Scherler<scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/