cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: JXTG and caching
Date Tue, 01 Jun 2004 09:20:29 GMT
Leszek Gawron wrote:

> Sylvain Wallez wrote:
>>  <page jx:cache-key="" 
>> jx:cache-validity="">
> One question: if this NewsHelper is NOT an avalon component (or object 
> instantiated by flow.createObject) then it doesn't have acces to any 
> backend logic or data (for example database that stores expiration 
> time for different news services). Would it be possible to instantiate 
> this object via flow.createObject analogy?

Two anwsers to this:
- we could add a builtin "createObject()" to the JXG expression 
language, thus directly solving your problem. I don't think this is a 
good idea as it opens the door to too much code in the template.
- the NewsHelper object can be created in the flow and passed as 
viewData. This keeps things clean: the flow gives necessary data to the 
view, and the view pulls what it needs from that data, including means 
to compute the cache information.


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message