You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by me...@apache.org on 2013/09/28 21:11:55 UTC

svn commit: r1527218 - in /jspwiki/trunk: ./ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/java/org/apache/wiki/attachment/ jspwiki-war/src/main/java/org/apache/wiki/providers/

Author: metskem
Date: Sat Sep 28 19:11:54 2013
New Revision: 1527218

URL: http://svn.apache.org/r1527218
Log:
2013-09-28  Harry Metske (metskem@apache.org)

       * 2.10.0-svn-46

       * fixed JSPWIKI-792 additional fix, ehcaches now have unlimited expiry (RecentChanges were not showing all entries)

Modified:
    jspwiki/trunk/ChangeLog
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java

Modified: jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1527218&r1=1527217&r2=1527218&view=diff
==============================================================================
--- jspwiki/trunk/ChangeLog (original)
+++ jspwiki/trunk/ChangeLog Sat Sep 28 19:11:54 2013
@@ -1,3 +1,9 @@
+2013-09-28  Harry Metske (metskem@apache.org)
+
+       * 2.10.0-svn-46
+
+       * fixed JSPWIKI-792 additional fix, ehcaches now have unlimited expiry (RecentChanges were not showing all entries)
+
 2013-09-15  Glen Mazza (gmazza AT apache DOT org)
 
        * Removed jspwiki-site under jspwiki-trunk, now just one source of record

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1527218&r1=1527217&r2=1527218&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Sat Sep 28 19:11:54 2013
@@ -75,7 +75,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "44";
+    public static final String     BUILD         = "46";
     
     /**
      *  This is the generic version string you should use

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java?rev=1527218&r1=1527217&r2=1527218&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentManager.java Sat Sep 28 19:11:54 2013
@@ -79,8 +79,6 @@ public class AttachmentManager
 
     /** The capacity of the cache, if you want something else, tweak ehcache.xml. */
     public static final int   DEFAULT_CACHECAPACITY   = 1000;
-    private int expiryPeriod = 24*60*60;
-
 
     /**
      *  Creates a new AttachmentManager.  Note that creation will never fail,
@@ -134,7 +132,7 @@ public class AttachmentManager
                 m_dynamicAttachments = m_cacheManager.getCache(CACHE_NAME);
             } else {
                 log.info("cache with name " + CACHE_NAME + " not found in ehcache.xml, creating it with defaults.");
-                m_dynamicAttachments = new Cache(CACHE_NAME, DEFAULT_CACHECAPACITY, false, false, expiryPeriod, expiryPeriod);
+                m_dynamicAttachments = new Cache(CACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0);
                 m_cacheManager.addCache(m_dynamicAttachments);
             }
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java?rev=1527218&r1=1527217&r2=1527218&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingAttachmentProvider.java Sat Sep 28 19:11:54 2013
@@ -53,8 +53,6 @@ public class CachingAttachmentProvider
 
     /** Default cache capacity for now. */
     public static final int m_capacity = 1000;
-    /** Default expiry period for now. */
-    private int m_pageContentExpiryPeriod = 24*60*60;
 
     /**
      *  The cache contains Collection objects which contain Attachment objects.
@@ -95,7 +93,7 @@ public class CachingAttachmentProvider
         if (m_cacheManager.cacheExists(ATTCOLLCACHE_NAME)) {
             m_cache = m_cacheManager.getCache(ATTCOLLCACHE_NAME);
         } else {
-            m_cache = new Cache(ATTCOLLCACHE_NAME, m_capacity, false, false, m_pageContentExpiryPeriod, m_pageContentExpiryPeriod);
+            m_cache = new Cache(ATTCOLLCACHE_NAME, m_capacity, false, false, 0, 0);
             m_cacheManager.addCache(m_cache);
         }
 
@@ -105,7 +103,7 @@ public class CachingAttachmentProvider
         if (m_cacheManager.cacheExists(ATTCACHE_NAME)) {
             m_attCache = m_cacheManager.getCache(ATTCACHE_NAME);
         } else {
-            m_attCache = new Cache(ATTCACHE_NAME, m_capacity, false, false, m_pageContentExpiryPeriod, m_pageContentExpiryPeriod);
+            m_attCache = new Cache(ATTCACHE_NAME, m_capacity, false, false, 0, 0);
             m_cacheManager.addCache(m_attCache);
         }
 
@@ -285,12 +283,12 @@ public class CachingAttachmentProvider
         Element element =   m_cache.get(page.getName());
 
         if (element == null) {
-            log.debug("...wasn't in the cache");
+            log.debug(page.getName() + " wasn't in the cache");
             c = refresh(page);
 
             if (c == null) return null; // No such attachment
         } else {
-            log.debug("...FOUND in the cache");
+            log.debug(page.getName() + " FOUND in the cache");
             c = (Collection<Attachment>) element.getObjectValue();
         }
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java?rev=1527218&r1=1527217&r2=1527218&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/CachingProvider.java Sat Sep 28 19:11:54 2013
@@ -80,11 +80,6 @@ public class CachingProvider
     private long             m_historyCacheMisses = 0;
     private long             m_historyCacheHits   = 0;
 
-    /**
-     *  This can be very long, as normally all modifications are noticed in an earlier stage.
-     */
-    private int              m_pageContentExpiryPeriod = 24*60*60;
-
     // FIXME: This MUST be cached somehow.
 
     private boolean          m_gotall = false;
@@ -106,7 +101,7 @@ public class CachingProvider
             m_cache = m_cacheManager.getCache(CACHE_NAME);
         } else {
             log.info("cache with name " + CACHE_NAME +  " not found in ehcache.xml, creating it with defaults.");
-            m_cache = new Cache(CACHE_NAME, DEFAULT_CACHECAPACITY, false, false, m_pageContentExpiryPeriod, m_pageContentExpiryPeriod);
+            m_cache = new Cache(CACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0);
             m_cacheManager.addCache(m_cache);
         }
 
@@ -114,7 +109,7 @@ public class CachingProvider
             m_textCache= m_cacheManager.getCache(TEXTCACHE_NAME);
         } else {
             log.info("cache with name " + TEXTCACHE_NAME +  " not found in ehcache.xml, creating it with defaults.");
-            m_textCache = new Cache(TEXTCACHE_NAME, DEFAULT_CACHECAPACITY, false, false, m_pageContentExpiryPeriod, m_pageContentExpiryPeriod);
+            m_textCache = new Cache(TEXTCACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0);
             m_cacheManager.addCache(m_textCache);
         }
 
@@ -122,7 +117,7 @@ public class CachingProvider
             m_historyCache= m_cacheManager.getCache(HISTORYCACHE_NAME);
         } else {
             log.info("cache with name " + HISTORYCACHE_NAME +  " not found in ehcache.xml, creating it with defaults.");
-            m_historyCache = new Cache(HISTORYCACHE_NAME, DEFAULT_CACHECAPACITY, false, false, m_pageContentExpiryPeriod, m_pageContentExpiryPeriod);
+            m_historyCache = new Cache(HISTORYCACHE_NAME, DEFAULT_CACHECAPACITY, false, false, 0, 0);
             m_cacheManager.addCache(m_historyCache);
         }