Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 6550 invoked from network); 6 Feb 2006 11:43:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Feb 2006 11:43:01 -0000 Received: (qmail 38684 invoked by uid 500); 6 Feb 2006 11:42:59 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 38456 invoked by uid 500); 6 Feb 2006 11:42:58 -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 38434 invoked by uid 99); 6 Feb 2006 11:42:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 03:42:57 -0800 X-ASF-Spam-Status: No, hits=-9.4 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; Mon, 06 Feb 2006 03:42:57 -0800 Received: (qmail 6291 invoked by uid 65534); 6 Feb 2006 11:42:36 -0000 Message-ID: <20060206114236.6285.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r375255 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/generation/DirectoryGenerator.java status.xml Date: Mon, 06 Feb 2006 11:42:34 -0000 To: cvs@cocoon.apache.org From: jbq@apache.org X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: jbq Date: Mon Feb 6 03:42:31 2006 New Revision: 375255 URL: http://svn.apache.org/viewcvs?rev=375255&view=rev Log: Fix COCOON-1681: Generator "directory": Caching too much Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/generation/DirectoryGenerator.java cocoon/branches/BRANCH_2_1_X/status.xml Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/generation/DirectoryGenerator.java URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/generation/DirectoryGenerator.java?rev=375255&r1=375254&r2=375255&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/generation/DirectoryGenerator.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/generation/DirectoryGenerator.java Mon Feb 6 03:42:31 2006 @@ -516,28 +516,29 @@ public int isValid() { if (System.currentTimeMillis() <= expiry) { - return 1; + return SourceValidity.VALID; } - expiry = System.currentTimeMillis() + delay; int len = files.size(); for (int i = 0; i < len; i++) { File f = (File)files.get(i); if (!f.exists()) { - return -1; // File was removed + return SourceValidity.INVALID; // File was removed } long oldDate = ((Long)fileDates.get(i)).longValue(); long newDate = f.lastModified(); if (oldDate != newDate) { - return -1; + // File's last modified date has changed since last check + // NOTE: this occurs on directories as well when a file is added + return SourceValidity.INVALID; } } // all content is up to date: update the expiry date expiry = System.currentTimeMillis() + delay; - return 1; + return SourceValidity.VALID; } public int isValid(SourceValidity newValidity) { Modified: cocoon/branches/BRANCH_2_1_X/status.xml URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=375255&r1=375254&r2=375255&view=diff ============================================================================== --- cocoon/branches/BRANCH_2_1_X/status.xml (original) +++ cocoon/branches/BRANCH_2_1_X/status.xml Mon Feb 6 03:42:31 2006 @@ -180,6 +180,9 @@ --> + + Fix a bug in DirectoryGenerator: when using cocoon: changes were not detected + CForms: Incompatible change for <fb:custom>: the base context is now passed instead of the relative context. Please change corresponding classes and use getXpath() to create the relative context yourself.