cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r803446 - /cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/SimpleCache.java
Date Wed, 12 Aug 2009 11:06:45 GMT
Author: reinhard
Date: Wed Aug 12 11:06:45 2009
New Revision: 803446

URL: http://svn.apache.org/viewvc?rev=803446&view=rev
Log:
use a WeakHashMap to store cache entries

Modified:
    cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/SimpleCache.java

Modified: cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/SimpleCache.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/SimpleCache.java?rev=803446&r1=803445&r2=803446&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/SimpleCache.java
(original)
+++ cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/SimpleCache.java
Wed Aug 12 11:06:45 2009
@@ -18,23 +18,23 @@
  */
 package org.apache.cocoon.pipeline.caching;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.WeakHashMap;
 
 import org.apache.cocoon.pipeline.util.StringRepresentation;
 
 /**
  * A very simple implementation of the {@link Cache} interface.<br>
  * <br>
- * It uses a {@link HashMap} as internal data store.
+ * It uses a {@link WeakHashMap} as internal data store.
  */
 public class SimpleCache extends AbstractCache {
 
-    private final Map<CacheKey, CacheValue> map = new HashMap<CacheKey, CacheValue>();
+    private final Map<CacheKey, CacheValue> map = new WeakHashMap<CacheKey, CacheValue>();
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see java.lang.Object#toString()
      */
     @Override
@@ -44,7 +44,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.pipeline.caching.AbstractCache#retrieve(org.apache.cocoon.pipeline.caching.CacheKey)
      */
     @Override
@@ -54,7 +54,7 @@
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.pipeline.caching.AbstractCache#store(org.apache.cocoon.pipeline.caching.CacheKey,
      *      org.apache.cocoon.pipeline.caching.CacheValue)
      */



Mime
View raw message