You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Frank Taffelt <fr...@interface-business.de> on 2003/10/06 16:16:30 UTC

Cacheable XSP with key based on jpath

Hi,

i wanna make my xsp page cacheable based on the cache example included in
the samples.

If i understand the caching mechanism right, the processing order of an XSP
page is as follows:

1. getKey is called
2. getValidity is called
3. generate method is called

In my scenario the value of the cachekey can computed at first at the
generate method level, which is called after the getKey method. The reason
for this is the jpath taglib, that computes it's value inside the scope of
the generate method. But i need this value at the getKey calling level.

Do i have something overlooked?

thanks,
Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cacheable XSP with key based on jpath

Posted by Geoff Howard <co...@leverageweb.com>.
Frank Taffelt wrote:
> Hi,
> 
> i wanna make my xsp page cacheable based on the cache example included in
> the samples.
> 
> If i understand the caching mechanism right, the processing order of an XSP
> page is as follows:
> 
> 1. getKey is called
> 2. getValidity is called
> 3. generate method is called
> 
> In my scenario the value of the cachekey can computed at first at the
> generate method level, which is called after the getKey method. The reason
> for this is the jpath taglib, that computes it's value inside the scope of
> the generate method. But i need this value at the getKey calling level.

If I understand your situation correctly, this post at the wiki by 
Sylvain is just what you need:
http://wiki.cocoondev.org/Wiki.jsp?page=WritingForCacheEfficiency.
Put simply, provide the object during getKey but fill the object during 
generate.

HTH,
Geoff Howard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org