Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 36712 invoked from network); 25 Aug 2005 07:30:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Aug 2005 07:30:30 -0000 Received: (qmail 25693 invoked by uid 500); 25 Aug 2005 07:30:29 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 25659 invoked by uid 500); 25 Aug 2005 07:30:29 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 25642 invoked by uid 99); 25 Aug 2005 07:30:29 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 25 Aug 2005 00:30:27 -0700 Received: (qmail 36693 invoked by uid 65534); 25 Aug 2005 07:30:27 -0000 Message-ID: <20050825073027.36692.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r240014 - in /cocoon/branches/BRANCH_2_1_X: src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java src/blocks/portal/samples/coplets/basket/basket.js status.xml Date: Thu, 25 Aug 2005 07:30:25 -0000 To: cvs@cocoon.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: cziegeler Date: Thu Aug 25 00:30:14 2005 New Revision: 240014 URL: http://svn.apache.org/viewcvs?rev=240014&view=rev Log: Fix bugs in CachingURICopletAdapter - store cache information in temporary attributes. This bug fix introduces incompatible changes: the cache validity attribute is not used anymore, use the cache temporary attribute instead and update your code to use temporary attributes instead of (persistent) attributes. Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/coplets/basket/basket.js cocoon/branches/BRANCH_2_1_X/status.xml Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java?rev=240014&r1=240013&r2=240014&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplet/adapter/impl/CachingURICopletAdapter.java Thu Aug 25 00:30:14 2005 @@ -58,10 +58,10 @@ /** The configuration name for ignoring sizing events to clear the cache. */ public static final String CONFIGURATION_IGNORE_SIZING_EVENTS = "ignore-sizing-events"; - /** The attribute name for storing the cached coplet content. */ + /** The temporary attribute name for the storing the cached coplet content. */ public static final String CACHE = "cacheData"; - /** This attribute can be set on the instance to not cache the current response. */ + /** This temporary attribute can be set on the instance to not cache the current response. */ public static final String DO_NOT_CACHE = "doNotCache"; /** @@ -143,18 +143,18 @@ data = response.getResponse(); } } else { - data = coplet.getAttribute(CACHE); + data = coplet.getTemporaryAttribute(CACHE); } } if (data == null) { // if caching is permanently or temporary disabled, flush the cache and invoke coplet - if ( !cachingEnabled || coplet.getAttribute(DO_NOT_CACHE) != null ) { - coplet.removeAttribute(DO_NOT_CACHE); + if ( !cachingEnabled || coplet.getTemporaryAttribute(DO_NOT_CACHE) != null ) { + coplet.removeTemporaryAttribute(DO_NOT_CACHE); if ( cacheGlobal ) { final String key = this.getCacheKey(coplet, uri); this.cache.remove(key); } else { - coplet.removeAttribute(CACHE); + coplet.removeTemporaryAttribute(CACHE); } super.streamContent(coplet, uri, contentHandler); } else { @@ -173,7 +173,7 @@ this.getLogger().warn("Exception during storing response into cache.", pe); } } else { - coplet.setAttribute(CACHE, data); + coplet.setTemporaryAttribute(CACHE, data); } } } @@ -213,7 +213,7 @@ (String) coplet.getCopletData().getAttribute("uri")); this.cache.remove(key); } else { - coplet.removeAttribute(CACHE); + coplet.removeTemporaryAttribute(CACHE); } } } Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/coplets/basket/basket.js URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/coplets/basket/basket.js?rev=240014&r1=240013&r2=240014&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/coplets/basket/basket.js (original) +++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/samples/coplets/basket/basket.js Thu Aug 25 00:30:14 2005 @@ -124,7 +124,7 @@ } // we have to reset our state - coplet.setAttribute("doNotCache", "1"); + coplet.setTemporaryAttribute("doNotCache", "1"); coplet.setTemporaryAttribute("application-uri", coplet.getCopletData().getAttribute("temporary:application-uri")); // and now do a redirect Modified: cocoon/branches/BRANCH_2_1_X/status.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=240014&r1=240013&r2=240014&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/status.xml (original) +++ cocoon/branches/BRANCH_2_1_X/status.xml Thu Aug 25 00:30:14 2005 @@ -196,6 +196,12 @@ + + Portal block: Fix bugs in CachingURICopletAdapter - store cache information in temporary attributes. + This bug fix introduces incompatible changes: the cache validity attribute is not + used anymore, use the cache temporary attribute instead and update your code to + use temporary attributes instead of (persistent) attributes. + Updated jakarta-regexp to 1.4.