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...@locus.apache.org on 2000/11/14 23:03:00 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon/cache CocoonCache.java
greenrd 00/11/14 14:03:00
Modified: . changes.xml
src/org/apache/cocoon/cache CocoonCache.java
Log:
fixed zombie caching bug
Revision Changes Path
1.146 +6 -1 xml-cocoon/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon/changes.xml,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- changes.xml 2000/11/13 20:52:50 1.145
+++ changes.xml 2000/11/14 22:02:55 1.146
@@ -4,7 +4,7 @@
<!--
History of Cocoon changes
- $Id: changes.xml,v 1.145 2000/11/13 20:52:50 greenrd Exp $
+ $Id: changes.xml,v 1.146 2000/11/14 22:02:55 greenrd Exp $
-->
<changes title="History of Changes">
@@ -18,6 +18,11 @@
</devs>
<release version="@version@" date="@date@">
+ <action dev="RDG" type="fix" due-to="Tagunov Anthony"
+ due-to-email="atagunov@nnt.ru">
+ Fixed zombie caching bug where old versions of pages would reappear after
+ certain errors.
+ </action>
<action dev="RDG" type="add">
Simple (manual!) contributions management system for contributions
to Cocoon. See documentation.
1.8 +6 -3 xml-cocoon/src/org/apache/cocoon/cache/CocoonCache.java
Index: CocoonCache.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/cache/CocoonCache.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CocoonCache.java 2000/11/01 20:12:40 1.7
+++ CocoonCache.java 2000/11/14 22:02:57 1.8
@@ -1,4 +1,4 @@
-/*-- $Id: CocoonCache.java,v 1.7 2000/11/01 20:12:40 greenrd Exp $ --
+/*-- $Id: CocoonCache.java,v 1.8 2000/11/14 22:02:57 greenrd Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -62,7 +62,7 @@
* statically and dynamically generated.
*
* @author <a href="stefano@apache.org">Stefano Mazzocchi</a>
- * @version $Revision: 1.7 $Date: 2000/11/01 20:12:40 $
+ * @version $Revision: 1.8 $Date: 2000/11/14 22:02:57 $
*/
public class CocoonCache implements Cache, Status {
@@ -79,7 +79,8 @@
* the page is returned, otherwise null is returned.
*/
public Page getPage(HttpServletRequest request) {
- Page page = (Page) store.get(Utils.encode(request));
+ String encoded = Utils.encode(request);
+ Page page = (Page) store.get(encoded);
if (page == null) {
return null;
@@ -94,6 +95,8 @@
break;
}
}
+
+ if (changed) store.remove (encoded);
return (changed) ? null : page;
}