cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <>
Subject Re: JXTG and caching
Date Tue, 01 Jun 2004 08:41:34 GMT
Le 1 juin 04, à 10:09, Sylvain Wallez a écrit :

> ...Well, it _could_ have a chance to work, but flowscript is 
> definitely not the appropriate location to compute cache information 
> for an element of the view pipeline....

flowscript maybe not but how about backend java code?

Use-case: for a news site, you might want the cache validity to be 
dependent on the "urgency" of the news, for example cache older news 
for a longer time, assuming they won't change much anymore.

In this case the cache validity (or at least hints to the appropriate 
validity range) needs to come from the backend.

> ...So what about adding two optional attributes on the template's root 
> element, defining the cache information?
> <page
>    xmlns:jx=""
>    jx:cache-key='${cocoon.request.get("abc") + "!!spacer!!" + 
> cocoon.request.get("bcd")....'
>    jx:cache-validity='${new DeltaTimeCacheValidity(60 * 60 * 24)}'>
>    ... template ....
> </page>

I like the idea, and IIUC it would also allow the Flow to receive the 
DeltaTimeCacheValidity (for example) from your java code and pass it 
down to JXTG, right?


Or, in other words, do you see this as having access to any additional 
variables passed in the cocoon.sendPage call?


View raw message