cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: [RT] Attribute Driven Templates
Date Tue, 07 Dec 2004 19:46:19 GMT
Leszek Gawron wrote:
> Daniel Fagerstrom wrote:
> 
>> Leszek Gawron wrote:
>>
>>> Daniel Fagerstrom wrote:
>>>
>>>> Leszek Gawron wrote:
>>
>>
>> <snip/>
>>
>>>>> We also need:
>>>>> - some script compiler directives i.e. for cache control (as in JXTG)
>>>
>>>
>>>  > Seem reasonable, sugest some mechanism.
>>>
>>> <ignore do="processingInstruction( 'cache-key', $cacheKey )"/> if we 
>>> want the directive to remove element at which it was declare. Or we 
>>> could pass processing instructions at page root (or any element) if 
>>> the element would stay in the template.
>>
>>
>>
>> Ok.
>> What will the $cacheKey typically be? Can you give an example or a 
>> pointer to the docu or discussion about how it work in JXTG?
> 
> The whole thread: 
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108604471307300&w=2
> 
> Resolution description:
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108627413529986&w=2
> 
And the implementation details, which I forgot to add:

The cache key and cache validity are JXTExpressions that are passed via
<root jx:cache-key="${expr}" jx:cache-validity="${expr2}">
</root>

The expressions are stored in a map attached to the compiled script. 
Every time cocoon asks the generator for key or validity an appropriate 
expression gets evaluated in current context. The rest is being done by 
cocoon core itself.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Mime
View raw message