You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2001/05/07 11:39:00 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon/generation AbstractServerPage.java ServerPagesGenerator.java

cziegeler    01/05/07 02:38:59

  Modified:    src/org/apache/cocoon/generation Tag: xml-cocoon2
                        AbstractServerPage.java ServerPagesGenerator.java
  Removed:     src/org/apache/cocoon/caching Tag: xml-cocoon2
                        NOTCacheValidity.java
  Log:
  Fixed cache validity handling
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.12  +3 -4      xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractServerPage.java
  
  Index: AbstractServerPage.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/AbstractServerPage.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- AbstractServerPage.java	2001/05/05 21:34:44	1.1.2.11
  +++ AbstractServerPage.java	2001/05/07 09:38:55	1.1.2.12
  @@ -11,7 +11,6 @@
   import org.apache.cocoon.caching.Cacheable;
   import org.apache.cocoon.caching.CacheValidity;
   import org.apache.cocoon.caching.NOPCacheValidity;
  -import org.apache.cocoon.caching.NOTCacheValidity;
   import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.environment.Request;
   import org.xml.sax.SAXException;
  @@ -22,7 +21,7 @@
    * declares variables that must be explicitly initialized by code generators.
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/05/05 21:34:44 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/05/07 09:38:55 $
    */
   public abstract class AbstractServerPage
     extends ServletGenerator implements CompiledComponent, Cacheable
  @@ -97,11 +96,11 @@
      *
      * @return The generated validity object, <code>NOPCacheValidity</code>
      *         is the default if hasContentChange() gives false otherwise
  -   *         <code>NOTCacheValidity</code> will be returned.
  +   *         <code>null</code> will be returned.
      */
     public CacheValidity generateValidity() {
       if (hasContentChanged(request))
  -      return new NOTCacheValidity();
  +      return null;
       else
         return new NOPCacheValidity();
     }
  
  
  
  1.1.2.29  +8 -5      xml-cocoon/src/org/apache/cocoon/generation/Attic/ServerPagesGenerator.java
  
  Index: ServerPagesGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/ServerPagesGenerator.java,v
  retrieving revision 1.1.2.28
  retrieving revision 1.1.2.29
  diff -u -r1.1.2.28 -r1.1.2.29
  --- ServerPagesGenerator.java	2001/05/04 13:38:03	1.1.2.28
  +++ ServerPagesGenerator.java	2001/05/07 09:38:56	1.1.2.29
  @@ -46,7 +46,7 @@
    * delegating actual SAX event generation.
    *
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.28 $ $Date: 2001/05/04 13:38:03 $
  + * @version CVS $Revision: 1.1.2.29 $ $Date: 2001/05/07 09:38:56 $
    */
   public class ServerPagesGenerator
     extends ServletGenerator
  @@ -102,10 +102,13 @@
      */
     public CacheValidity generateValidity() {
       CacheValidity genValidity = generator.generateValidity();
  -    HashMap map = new HashMap (1);
  -    map.put("source", this.source);
  -    ParametersCacheValidity pcv = new ParametersCacheValidity(map);
  -    return new CompositeCacheValidity(genValidity, pcv);
  +    if (genValidity != null) {
  +        HashMap map = new HashMap (1);
  +        map.put("source", this.source);
  +        ParametersCacheValidity pcv = new ParametersCacheValidity(map);
  +        return new CompositeCacheValidity(genValidity, pcv);
  +    }
  +    return null;
     }
   
     /**
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org