Index: jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java =================================================================== --- jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java (revision 915810) +++ jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java Wed Apr 14 17:17:46 CEST 2010 @@ -31,8 +31,8 @@ * 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 - * RepositoryService 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 + * RepositoryService but not immediately needed are put into the cache to avoid further * round trips to RepositoryService. 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 @@ 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 @@ 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 @@ /** * 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();