roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r378775 - in /incubator/roller/trunk/src/org/roller/presentation/filters: IfModifiedWeblogPageCacheFilter.java WeblogPageCacheFilter.java
Date Sat, 18 Feb 2006 21:03:13 GMT
Author: agilliland
Date: Sat Feb 18 13:03:12 2006
New Revision: 378775

URL: http://svn.apache.org/viewcvs?rev=378775&view=rev
Log:
converting weblog entry anchors to base64 in cache keys.  it appears that some anchors still
end up with spaces in them, which is not desirable.


Modified:
    incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedWeblogPageCacheFilter.java
    incubator/roller/trunk/src/org/roller/presentation/filters/WeblogPageCacheFilter.java

Modified: incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedWeblogPageCacheFilter.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedWeblogPageCacheFilter.java?rev=378775&r1=378774&r2=378775&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedWeblogPageCacheFilter.java
(original)
+++ incubator/roller/trunk/src/org/roller/presentation/filters/IfModifiedWeblogPageCacheFilter.java
Sat Feb 18 13:03:12 2006
@@ -37,6 +37,7 @@
 import org.roller.presentation.cache.CacheHandler;
 import org.roller.presentation.cache.CacheManager;
 import org.roller.presentation.cache.LazyExpiringCacheEntry;
+import org.roller.util.Utilities;
 
 
 /**
@@ -174,9 +175,8 @@
         key.append(pageRequest.getWeblogPage());
         
         if(pageRequest.getWeblogAnchor() != null) {
-            // TODO: do we need to convert to base64 here?
-            // this.weblogAnchor = Utilities.toBase64(this.weblogAnchor.getBytes());
-            key.append("/").append(pageRequest.getWeblogAnchor());
+            // convert to base64 because there can be spaces in anchors :/
+            key.append("/").append(Utilities.toBase64(pageRequest.getWeblogAnchor().getBytes()));
         } else {
             if(pageRequest.getWeblogDate() != null) {
                 key.append("/").append(pageRequest.getWeblogDate());

Modified: incubator/roller/trunk/src/org/roller/presentation/filters/WeblogPageCacheFilter.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/filters/WeblogPageCacheFilter.java?rev=378775&r1=378774&r2=378775&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/filters/WeblogPageCacheFilter.java
(original)
+++ incubator/roller/trunk/src/org/roller/presentation/filters/WeblogPageCacheFilter.java
Sat Feb 18 13:03:12 2006
@@ -37,6 +37,7 @@
 import org.roller.presentation.cache.LazyExpiringCacheEntry;
 import org.roller.presentation.util.CacheHttpServletResponseWrapper;
 import org.roller.presentation.util.ResponseContent;
+import org.roller.util.Utilities;
 
 
 /**
@@ -198,9 +199,8 @@
         key.append(pageRequest.getPageType());
         
         if(pageRequest.getWeblogAnchor() != null) {
-            // TODO: do we need to convert to base64 here?
-            // this.weblogAnchor = Utilities.toBase64(this.weblogAnchor.getBytes());
-            key.append("/").append(pageRequest.getWeblogAnchor());
+            // convert to base64 because there can be spaces in anchors :/
+            key.append("/").append(Utilities.toBase64(pageRequest.getWeblogAnchor().getBytes()));
         } else {
             
             if(pageRequest.getWeblogDate() != null) {



Mime
View raw message