You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gr...@apache.org on 2001/01/19 01:23:49 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon Utils.java

greenrd     01/01/18 16:23:49

  Modified:    .        changes.xml
               src/org/apache/cocoon/processor/xslt XSLTProcessor.java
               src/org/apache/cocoon Utils.java
  Log:
  last minute caching fixes
  
  Revision  Changes    Path
  1.182     +8 -1      xml-cocoon/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/changes.xml,v
  retrieving revision 1.181
  retrieving revision 1.182
  diff -u -r1.181 -r1.182
  --- changes.xml	2001/01/18 23:40:19	1.181
  +++ changes.xml	2001/01/19 00:23:46	1.182
  @@ -4,7 +4,7 @@
   
   <!--
     History of Cocoon changes   
  -  $Id: changes.xml,v 1.181 2001/01/18 23:40:19 greenrd Exp $ 
  +  $Id: changes.xml,v 1.182 2001/01/19 00:23:46 greenrd Exp $ 
   -->
   
   <changes title="History of Changes">
  @@ -18,6 +18,13 @@
     </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="RDG" type="fix" due-to="Wayne Bayever" due-to-email="wbayever@yahoo.com">
  +   XSLT stylesheet caching now ignores query string, as it should.
  +  </action>
  +  <action dev="RDG" type="update">
  +   Removed headers from cache key because this was breaking caching in 90% of static cases.
  +   This is a quick fix - will fix properly later.
  +  </action>
     <action dev="RDG" type="add">
      Added &lt;?cocoon-disable-caching?&gt; processing instruction to disable
      caching for a page. This is most useful for cases like samples/fp,
  
  
  
  1.26      +4 -4      xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
  
  Index: XSLTProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- XSLTProcessor.java	2000/12/22 11:51:09	1.25
  +++ XSLTProcessor.java	2001/01/19 00:23:48	1.26
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSLTProcessor.java,v 1.25 2000/12/22 11:51:09 greenrd Exp $ --
  +/*-- $Id: XSLTProcessor.java,v 1.26 2001/01/19 00:23:48 greenrd Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -75,7 +75,7 @@
    * This class implements an XSLT processor.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.25 $ $Date: 2000/12/22 11:51:09 $
  + * @version $Revision: 1.26 $ $Date: 2001/01/19 00:23:48 $
    */
   
   public class XSLTProcessor implements Actor, Processor, Status, Defaults, Cacheable {
  @@ -251,7 +251,7 @@
               if ((o != null) && (!sheetMonitor.hasChanged(resource))) {
                   return (Document) o;
               } else {
  -                String encReq = Utils.encode (request);
  +                String encReq = Utils.encode (request, true, false);
                   // resource URI might have changed so invalidate previous
                   requestMonitor.invalidate(encReq);
                   Document sheet = getDocument(resource);
  @@ -271,7 +271,7 @@
       }
   
       public boolean hasChanged(Object context) {
  -        return requestMonitor.hasChanged(Utils.encode((HttpServletRequest) context));
  +        return requestMonitor.hasChanged(Utils.encode((HttpServletRequest) context, true, false));
       }
   
       public boolean isCacheable(HttpServletRequest request) {
  
  
  
  1.23      +4 -2      xml-cocoon/src/org/apache/cocoon/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Utils.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Utils.java	2001/01/16 15:50:30	1.22
  +++ Utils.java	2001/01/19 00:23:48	1.23
  @@ -1,4 +1,4 @@
  -/*-- $Id: Utils.java,v 1.22 2001/01/16 15:50:30 greenrd Exp $ --
  +/*-- $Id: Utils.java,v 1.23 2001/01/19 00:23:48 greenrd Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -66,7 +66,7 @@
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:greenrd@hotmail.com">Robin Green</a>
  - * @version $Revision: 1.22 $ $Date: 2001/01/16 15:50:30 $
  + * @version $Revision: 1.23 $ $Date: 2001/01/19 00:23:48 $
    */
   
   public final class Utils {
  @@ -231,6 +231,7 @@
               url.append(req.getQueryString());
           }
   
  +        /** This severely f***s up caching. Will fix later - RDG
           Enumeration headers = req.getHeaderNames();
           if (headers != null) {
             url.append("&headers:");
  @@ -241,6 +242,7 @@
               url.append((String)req.getHeader(name));
             }
           }
  +        */
           return url.toString();
       }
   
  
  
  

question cocoon1.8 - reaction pattern !

Posted by Gabi Brysch <br...@inxnet.de>.
hi,

i unterstand this reaction pattern and most of the classes which
implement the components - because the names are 'equal' 

- but i'm not really sure about which class
'realizes' the reactor ??

is it the engine class ???

GABI



Re: (last minute fixes)

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 Jan 2001, Donald Ball wrote:

> hang tight - i think i'm -1 on this stuff. these patches aren't going to
> have had jack in the way of real world testing before the 1.8.1 release.
> we'd already voted to wait until release before applying some other
> caching patches (from olivier?). i would think these patches should be
> handled similarly.
>
> patches to the caching system are particularly problematic since errors in
> a caching system may not show up on your system under light load; they may
> only show up on another system under heavy load.

but then again, since we've done an official release, i'll remove my -1
and just ask you to listen to the votes on the dev list more carefully for
the next go 'round. thanks for handling the release, i'm glad that one's
out the door.

- donald


Re: (last minute fixes)

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 Jan 2001, Donald Ball wrote:

> hang tight - i think i'm -1 on this stuff. these patches aren't going to
> have had jack in the way of real world testing before the 1.8.1 release.
> we'd already voted to wait until release before applying some other
> caching patches (from olivier?). i would think these patches should be
> handled similarly.
>
> patches to the caching system are particularly problematic since errors in
> a caching system may not show up on your system under light load; they may
> only show up on another system under heavy load.

but then again, since we've done an official release, i'll remove my -1
and just ask you to listen to the votes on the dev list more carefully for
the next go 'round. thanks for handling the release, i'm glad that one's
out the door.

- donald


(last minute fixes)

Posted by Donald Ball <ba...@webslingerZ.com>.
hang tight - i think i'm -1 on this stuff. these patches aren't going to
have had jack in the way of real world testing before the 1.8.1 release.
we'd already voted to wait until release before applying some other
caching patches (from olivier?). i would think these patches should be
handled similarly.

patches to the caching system are particularly problematic since errors in
a caching system may not show up on your system under light load; they may
only show up on another system under heavy load.

- donald

On 19 Jan 2001 greenrd@apache.org wrote:

> greenrd     01/01/18 16:23:49
>
>   Modified:    .        changes.xml
>                src/org/apache/cocoon/processor/xslt XSLTProcessor.java
>                src/org/apache/cocoon Utils.java
>   Log:
>   last minute caching fixes
>
>   Revision  Changes    Path
>   1.182     +8 -1      xml-cocoon/changes.xml
>
>   Index: changes.xml
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/changes.xml,v
>   retrieving revision 1.181
>   retrieving revision 1.182
>   diff -u -r1.181 -r1.182
>   --- changes.xml	2001/01/18 23:40:19	1.181
>   +++ changes.xml	2001/01/19 00:23:46	1.182
>   @@ -4,7 +4,7 @@
>
>    <!--
>      History of Cocoon changes
>   -  $Id: changes.xml,v 1.181 2001/01/18 23:40:19 greenrd Exp $
>   +  $Id: changes.xml,v 1.182 2001/01/19 00:23:46 greenrd Exp $
>    -->
>
>    <changes title="History of Changes">
>   @@ -18,6 +18,13 @@
>      </devs>
>
>     <release version="@version@" date="@date@">
>   +  <action dev="RDG" type="fix" due-to="Wayne Bayever" due-to-email="wbayever@yahoo.com">
>   +   XSLT stylesheet caching now ignores query string, as it should.
>   +  </action>
>   +  <action dev="RDG" type="update">
>   +   Removed headers from cache key because this was breaking caching in 90% of static cases.
>   +   This is a quick fix - will fix properly later.
>   +  </action>
>      <action dev="RDG" type="add">
>       Added &lt;?cocoon-disable-caching?&gt; processing instruction to disable
>       caching for a page. This is most useful for cases like samples/fp,
>
>
>
>   1.26      +4 -4      xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
>
>   Index: XSLTProcessor.java
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
>   retrieving revision 1.25
>   retrieving revision 1.26
>   diff -u -r1.25 -r1.26
>   --- XSLTProcessor.java	2000/12/22 11:51:09	1.25
>   +++ XSLTProcessor.java	2001/01/19 00:23:48	1.26
>   @@ -1,4 +1,4 @@
>   -/*-- $Id: XSLTProcessor.java,v 1.25 2000/12/22 11:51:09 greenrd Exp $ --
>   +/*-- $Id: XSLTProcessor.java,v 1.26 2001/01/19 00:23:48 greenrd Exp $ --
>
>     ============================================================================
>                       The Apache Software License, Version 1.1
>   @@ -75,7 +75,7 @@
>     * This class implements an XSLT processor.
>     *
>     * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
>   - * @version $Revision: 1.25 $ $Date: 2000/12/22 11:51:09 $
>   + * @version $Revision: 1.26 $ $Date: 2001/01/19 00:23:48 $
>     */
>
>    public class XSLTProcessor implements Actor, Processor, Status, Defaults, Cacheable {
>   @@ -251,7 +251,7 @@
>                if ((o != null) && (!sheetMonitor.hasChanged(resource))) {
>                    return (Document) o;
>                } else {
>   -                String encReq = Utils.encode (request);
>   +                String encReq = Utils.encode (request, true, false);
>                    // resource URI might have changed so invalidate previous
>                    requestMonitor.invalidate(encReq);
>                    Document sheet = getDocument(resource);
>   @@ -271,7 +271,7 @@
>        }
>
>        public boolean hasChanged(Object context) {
>   -        return requestMonitor.hasChanged(Utils.encode((HttpServletRequest) context));
>   +        return requestMonitor.hasChanged(Utils.encode((HttpServletRequest) context, true, false));
>        }
>
>        public boolean isCacheable(HttpServletRequest request) {
>
>
>
>   1.23      +4 -2      xml-cocoon/src/org/apache/cocoon/Utils.java
>
>   Index: Utils.java
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Utils.java,v
>   retrieving revision 1.22
>   retrieving revision 1.23
>   diff -u -r1.22 -r1.23
>   --- Utils.java	2001/01/16 15:50:30	1.22
>   +++ Utils.java	2001/01/19 00:23:48	1.23
>   @@ -1,4 +1,4 @@
>   -/*-- $Id: Utils.java,v 1.22 2001/01/16 15:50:30 greenrd Exp $ --
>   +/*-- $Id: Utils.java,v 1.23 2001/01/19 00:23:48 greenrd Exp $ --
>
>     ============================================================================
>                       The Apache Software License, Version 1.1
>   @@ -66,7 +66,7 @@
>     *
>     * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
>     * @author <a href="mailto:greenrd@hotmail.com">Robin Green</a>
>   - * @version $Revision: 1.22 $ $Date: 2001/01/16 15:50:30 $
>   + * @version $Revision: 1.23 $ $Date: 2001/01/19 00:23:48 $
>     */
>
>    public final class Utils {
>   @@ -231,6 +231,7 @@
>                url.append(req.getQueryString());
>            }
>
>   +        /** This severely f***s up caching. Will fix later - RDG
>            Enumeration headers = req.getHeaderNames();
>            if (headers != null) {
>              url.append("&headers:");
>   @@ -241,6 +242,7 @@
>                url.append((String)req.getHeader(name));
>              }
>            }
>   +        */
>            return url.toString();
>        }
>
>
>
>
>
> ----------------------------------------------------------------------
> 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
>
>


(last minute fixes)

Posted by Donald Ball <ba...@webslingerZ.com>.
hang tight - i think i'm -1 on this stuff. these patches aren't going to
have had jack in the way of real world testing before the 1.8.1 release.
we'd already voted to wait until release before applying some other
caching patches (from olivier?). i would think these patches should be
handled similarly.

patches to the caching system are particularly problematic since errors in
a caching system may not show up on your system under light load; they may
only show up on another system under heavy load.

- donald

On 19 Jan 2001 greenrd@apache.org wrote:

> greenrd     01/01/18 16:23:49
>
>   Modified:    .        changes.xml
>                src/org/apache/cocoon/processor/xslt XSLTProcessor.java
>                src/org/apache/cocoon Utils.java
>   Log:
>   last minute caching fixes
>
>   Revision  Changes    Path
>   1.182     +8 -1      xml-cocoon/changes.xml
>
>   Index: changes.xml
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/changes.xml,v
>   retrieving revision 1.181
>   retrieving revision 1.182
>   diff -u -r1.181 -r1.182
>   --- changes.xml	2001/01/18 23:40:19	1.181
>   +++ changes.xml	2001/01/19 00:23:46	1.182
>   @@ -4,7 +4,7 @@
>
>    <!--
>      History of Cocoon changes
>   -  $Id: changes.xml,v 1.181 2001/01/18 23:40:19 greenrd Exp $
>   +  $Id: changes.xml,v 1.182 2001/01/19 00:23:46 greenrd Exp $
>    -->
>
>    <changes title="History of Changes">
>   @@ -18,6 +18,13 @@
>      </devs>
>
>     <release version="@version@" date="@date@">
>   +  <action dev="RDG" type="fix" due-to="Wayne Bayever" due-to-email="wbayever@yahoo.com">
>   +   XSLT stylesheet caching now ignores query string, as it should.
>   +  </action>
>   +  <action dev="RDG" type="update">
>   +   Removed headers from cache key because this was breaking caching in 90% of static cases.
>   +   This is a quick fix - will fix properly later.
>   +  </action>
>      <action dev="RDG" type="add">
>       Added &lt;?cocoon-disable-caching?&gt; processing instruction to disable
>       caching for a page. This is most useful for cases like samples/fp,
>
>
>
>   1.26      +4 -4      xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
>
>   Index: XSLTProcessor.java
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
>   retrieving revision 1.25
>   retrieving revision 1.26
>   diff -u -r1.25 -r1.26
>   --- XSLTProcessor.java	2000/12/22 11:51:09	1.25
>   +++ XSLTProcessor.java	2001/01/19 00:23:48	1.26
>   @@ -1,4 +1,4 @@
>   -/*-- $Id: XSLTProcessor.java,v 1.25 2000/12/22 11:51:09 greenrd Exp $ --
>   +/*-- $Id: XSLTProcessor.java,v 1.26 2001/01/19 00:23:48 greenrd Exp $ --
>
>     ============================================================================
>                       The Apache Software License, Version 1.1
>   @@ -75,7 +75,7 @@
>     * This class implements an XSLT processor.
>     *
>     * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
>   - * @version $Revision: 1.25 $ $Date: 2000/12/22 11:51:09 $
>   + * @version $Revision: 1.26 $ $Date: 2001/01/19 00:23:48 $
>     */
>
>    public class XSLTProcessor implements Actor, Processor, Status, Defaults, Cacheable {
>   @@ -251,7 +251,7 @@
>                if ((o != null) && (!sheetMonitor.hasChanged(resource))) {
>                    return (Document) o;
>                } else {
>   -                String encReq = Utils.encode (request);
>   +                String encReq = Utils.encode (request, true, false);
>                    // resource URI might have changed so invalidate previous
>                    requestMonitor.invalidate(encReq);
>                    Document sheet = getDocument(resource);
>   @@ -271,7 +271,7 @@
>        }
>
>        public boolean hasChanged(Object context) {
>   -        return requestMonitor.hasChanged(Utils.encode((HttpServletRequest) context));
>   +        return requestMonitor.hasChanged(Utils.encode((HttpServletRequest) context, true, false));
>        }
>
>        public boolean isCacheable(HttpServletRequest request) {
>
>
>
>   1.23      +4 -2      xml-cocoon/src/org/apache/cocoon/Utils.java
>
>   Index: Utils.java
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Utils.java,v
>   retrieving revision 1.22
>   retrieving revision 1.23
>   diff -u -r1.22 -r1.23
>   --- Utils.java	2001/01/16 15:50:30	1.22
>   +++ Utils.java	2001/01/19 00:23:48	1.23
>   @@ -1,4 +1,4 @@
>   -/*-- $Id: Utils.java,v 1.22 2001/01/16 15:50:30 greenrd Exp $ --
>   +/*-- $Id: Utils.java,v 1.23 2001/01/19 00:23:48 greenrd Exp $ --
>
>     ============================================================================
>                       The Apache Software License, Version 1.1
>   @@ -66,7 +66,7 @@
>     *
>     * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
>     * @author <a href="mailto:greenrd@hotmail.com">Robin Green</a>
>   - * @version $Revision: 1.22 $ $Date: 2001/01/16 15:50:30 $
>   + * @version $Revision: 1.23 $ $Date: 2001/01/19 00:23:48 $
>     */
>
>    public final class Utils {
>   @@ -231,6 +231,7 @@
>                url.append(req.getQueryString());
>            }
>
>   +        /** This severely f***s up caching. Will fix later - RDG
>            Enumeration headers = req.getHeaderNames();
>            if (headers != null) {
>              url.append("&headers:");
>   @@ -241,6 +242,7 @@
>                url.append((String)req.getHeader(name));
>              }
>            }
>   +        */
>            return url.toString();
>        }
>
>
>
>
>
> ----------------------------------------------------------------------
> 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
>
>