jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r982293 - in /jackrabbit/branches/2.1: ./ jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java
Date Wed, 04 Aug 2010 15:12:29 GMT
Author: jukka
Date: Wed Aug  4 15:12:29 2010
New Revision: 982293

URL: http://svn.apache.org/viewvc?rev=982293&view=rev
Log:
2.1: Merged revision 938099 (JCR-2616)

Modified:
    jackrabbit/branches/2.1/   (props changed)
    jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java

Propchange: jackrabbit/branches/2.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug  4 15:12:29 2010
@@ -2,4 +2,4 @@
 /jackrabbit/sandbox/JCR-1456:774917-886178
 /jackrabbit/sandbox/JCR-2170:812417-816332
 /jackrabbit/sandbox/tripod-JCR-2209:795441-795863
-/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319,933144,933197,933203,933213,933216,933554,933646,933694,934405,934412,934849,935557,936668,955222,955229,955307,964362,965539
+/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319,933144,933197,933203,933213,933216,933554,933646,933694,934405,934412,934849,935557,936668,938099,955222,955229,955307,964362,965539

Modified: jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java?rev=982293&r1=982292&r2=982293&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java
Wed Aug  4 15:12:29 2010
@@ -31,8 +31,8 @@ import org.apache.jackrabbit.spi.Reposit
  * Item infos are put into the cache after they have been read from the {@link RepositoryService}.
  * If the cache is full, the oldest item is discared. Reading items removes the from the
cache.
  *
- * The undrlying idea here is, that {@link ItemInfo}s which are supplied by the
- * <code>RepositoryService</code> but not immediatly needed are put into the
cache to avoid further
+ * The underlying idea here is, that {@link ItemInfo}s which are supplied by the
+ * <code>RepositoryService</code> but not immediately needed are put into the
cache to avoid further
  * round trips to <code>RepositoryService</code>. When they are needed later,
they are read
  * from the cache. There is no need to keep them in this cache after that point since they
are
  * present in the hierarchy from then on.
@@ -75,6 +75,9 @@ public class ItemInfoCacheImpl implement
         Object entry = entries.remove(nodeId);
         if (entry == null) {
             entry = entries.remove(nodeId.getPath());
+        } else {
+            // there might be a corresponding path-indexed entry, clear it as well
+            entries.remove(node(entry).info.getPath());
         }
 
         return node(entry);
@@ -90,6 +93,9 @@ public class ItemInfoCacheImpl implement
         Object entry = entries.remove(propertyId);
         if (entry == null) {
             entry = entries.remove(propertyId.getPath());
+        } else {
+            // there might be a corresponding path-indexed entry, clear it as well
+            entries.remove(property(entry).info.getPath());
         }
 
         return property(entry);
@@ -97,7 +103,7 @@ public class ItemInfoCacheImpl implement
 
     /**
      * This implementation cached the item by its id and if the id
-     * id uuid based but has no path, also by its path.
+     * is uuid based but has no path, also by its path.
      */
     public void put(ItemInfo info, long generation) {
         ItemId id = info.getId();



Mime
View raw message