Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 18520 invoked from network); 28 Mar 2007 16:08:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Mar 2007 16:08:35 -0000 Received: (qmail 60717 invoked by uid 500); 28 Mar 2007 16:08:39 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 60663 invoked by uid 500); 28 Mar 2007 16:08:39 -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 List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 60651 invoked by uid 99); 28 Mar 2007 16:08:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 09:08:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [86.59.12.202] (HELO mx-05.sil.at) (86.59.12.202) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 09:08:28 -0700 Received: from [86.59.20.138] (helo=[10.4.1.249]) by mx-05.sil.at with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.60) (envelope-from ) id 1HWagx-0002Pc-8I for dev@cocoon.apache.org; Wed, 28 Mar 2007 18:08:07 +0200 Message-ID: <460A92E4.60100@apache.org> Date: Wed, 28 Mar 2007 18:08:04 +0200 From: Reinhard Poetz User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Moving reduced version of CachingSource to core | Configuration issues References: <4607B259.6010505@apache.org> <4607EE4C.9090604@reverycodes.com> <4607F125.5050302@apache.org> <4607F41A.9070801@reverycodes.com> <4607FE1C.6080002@apache.org> <46080366.5080100@reverycodes.com> In-Reply-To: <46080366.5080100@reverycodes.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Scan-Signature: bcddf3eb0974ec6e728b987b52a48d0a X-Virus-Checked: Checked by ClamAV on apache.org Vadim Gritsenko wrote: > Reinhard Poetz wrote: >> Vadim Gritsenko wrote: >>> Reinhard Poetz wrote: >>>> Vadim Gritsenko wrote: >>>>> Oops, should have read it in full... >>>>> >>>>> Reinhard Poetz wrote: >>>>> >>>>>> I can think of setting the expires parameter to -1 and using a >>>>>> background-refresher but this seems to be overly complex for this >>>>>> simple task. >>>>> >>>>> Yes async will do the trick. And IMHO it should be Ok to alter sync >>>>> implementation to keep previous response if new one can't be obtained. >>>> >>>> sounds easier than Ard's proposal (no offense ;-) ), or do I >>>> overlook something? >>> >>> Actually it already should be working this way? See CachingSource >>> line 427. >> >> I guess with some additional configuration it should be possible to >> get this stuff working but ... >> TBH, I only want to have a url like >> caching:http://www.example.org/rss.xml?cocoon:cache-expires=600 >> without any further configuration. The content should be available >> whatever happens to the RSS feed and should even survive restarts of >> Cocoon by default. After 10 minutes it should be tried to update it >> but shouldn't throw away the previous content in the case that the >> refresh runs into an exception. > > I think I know what you mean. It clears cache if not-async, at line 196. > But it should be relatively easy to modify it to use previously cached > response if new response isn't available. > > As for restarts, it should survive them if Cache is persisted, right? Finally it works now for me if used together with a persistent store (FilesystemStore). Using a EHCache wasn't successful to really survive restarts in every case but maybe it was only me who wasn't able to configure it correctly. I have to admit that it is not thoroughly tested but I plan to change this very soon when I integrate it into my current 2.2 based apps. -- Reinhard P�tz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc --------------------------------------------------------------------