Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 58613 invoked from network); 6 Jul 2004 10:29:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Jul 2004 10:29:00 -0000 Received: (qmail 19075 invoked by uid 500); 6 Jul 2004 10:28:50 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 18942 invoked by uid 500); 6 Jul 2004 10:28:48 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 18812 invoked by uid 99); 6 Jul 2004 10:28:46 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [212.85.125.162] (HELO v07274.home.net.pl) (212.85.125.162) by apache.org (qpsmtpd/0.27.1) with SMTP; Tue, 06 Jul 2004 03:28:45 -0700 Received: from sj162.internetdsl.tpnet.pl (HELO ?192.168.1.22?) (lgawron.mobilebox@home@80.55.87.162) by matrix15.home.net.pl with SMTP; 6 Jul 2004 10:28:08 -0000 Message-ID: <40EA7EB1.70903@mobilebox.pl> Date: Tue, 06 Jul 2004 12:28:01 +0200 From: Leszek Gawron User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Caching JXTemplate References: <20040705153111.GA31750@maribor.izzy.net> <40E9B32C.9030300@upaya.co.uk> <33886.10.0.0.5.1089077230.squirrel@10.0.0.5> <40EA3C04.4070902@upaya.co.uk> <34798.10.0.0.5.1089093450.squirrel@10.0.0.5> <40EA49EB.9060803@hippo.nl> <40EA4F00.6020405@hippo.nl> <40EA6FDF.2070607@mobilebox.pl> <40EA7278.5010201@hippo.nl> <40EA766E.1030203@hippo.nl> In-Reply-To: <40EA766E.1030203@hippo.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Unico Hommes wrote: > Unico Hommes wrote: > >> I am carrying this over to dev@ so other developers can comment. >> >> Leszek Gawron wrote: >> >>> Unico Hommes wrote: >>> > > > >>>> >>>> Oh but I think I see now. The cache-key and cache-validity objects >>>> are associated with the compiled template object using template >>>> properties. The compiled template in turn is cached directly by the >>>> generator using the validity of the src of the generator. That >>>> should work. >>>> >>>> So now how to use this feature. If I read this correctly cache-key >>>> and cache-validity attributes can be specified on an element >>>> anywhere in the xml: >>>> >>>> >>> jx:cache-validity="${cacheValidityExpression}" /> >>> >>> >>> >>> >>> Yes it is. I am thinking about a slight change. Right now every xml >>> node is parsed for jx:* attributes. What I would like to do is to >>> introduce >>> >>> wdyt? >>> >> >> Yes, I agree it would be better not to check each element for these >> attributes. sounds like a good option to me. >> > > There is one other thing. The cache key that is returned by > JXTemplateGenerator should be the src + jx:cache-key attribute value. > Since the jx:cache-key is only a hash of the objects that are used in > the template. These could, in theory, be the same as those objects used > by another template. Therefore it is neccessary to also qualify the > cache key with location of the template. > Shouldn't it be done automatically by cocoon? So the cocoon is always composed of view id and cache key? Why would user need to share cache-keys between views? -- 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