[prev in list] [next in list] [prev in thread] [next in thread]
List: xml-cocoon-dev
Subject: AW: JXTG and caching
From: "Marco Rolappe" <m_rolappe () web ! de>
Date: 2004-05-31 23:20:55
Message-ID: PIEGKIAINHPDEOEPIPNIMEFICKAA.m_rolappe () web ! de
[Download RAW message or body]
> -----Ursprungliche Nachricht-----
> Von: dev-return-61667-m_rolappe=web.de@cocoon.apache.org
> [mailto:dev-return-61667-m_rolappe=web.de@cocoon.apache.org]Im Auftrag
> von Leszek Gawron
> Gesendet: Dienstag, 1. Juni 2004 01:05
> An: dev@cocoon.apache.org
> Betreff: JXTG and caching
>
>
> While almost everybody buried XSP it has got one great feature that JXTG
> lacks: it's cacheable. I know that there is no way to implement
> automatic JXTG caching but what if I know on what env does jx template
> operate. If I know that it is for example only request param "abc" and
> "bcd" and session attribute "xxx" then I know when I can use cached
> entry. The question is: how?
the automatic caching could be done; collect all references to the template
context and make a ParameterValidity from their names and values.
> Should I extend JXTemplateGenerator so it is a cached component? I
> understand it gets the validity methods to implement then. So every time
> I call my extended component from flow I pass also the validity
> calculated in flow. Something like this:
>
> function niceCachedResponse() {
> var cacheKey = cocoon.request.get( "abc" ) + "!!spacer!!"
> + cocoon.request.get( "bcd" ) + "!!spacer!!"
> + cocoon.session.getAttribute( "xxx" );
> var pageValidity = new DeltaTimeCacheValidity( 60 * 60 * 24 );
> // one day
> cocoon.sendPage( "view/cached.jx", {
> JXTGExtCacheKey: cacheKey,
> JXTGExtpageValidity: pageValidity
> someOtherBizData: data } );
> }
>
> Does it have a chance to work ?
sure, I've already done something similar, but didn't yet implement the
above mentioned parameter stuff.
in the end there should be those two possibilities;
1. set custom cacheability info for the bizdata/model/template context in
the flow/JXTG context
2. have JXTG make a ParameterValidity from the references
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic