You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vg...@apache.org on 2008/11/09 22:53:28 UTC

svn commit: r712567 - /xml/xindice/trunk/java/src/org/apache/xindice/core/cache/DocumentCacheImpl.java

Author: vgritsenko
Date: Sun Nov  9 13:53:28 2008
New Revision: 712567

URL: http://svn.apache.org/viewvc?rev=712567&view=rev
Log:
add debug output

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/core/cache/DocumentCacheImpl.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/cache/DocumentCacheImpl.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/cache/DocumentCacheImpl.java?rev=712567&r1=712566&r2=712567&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/cache/DocumentCacheImpl.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/cache/DocumentCacheImpl.java Sun Nov  9 13:53:28 2008
@@ -58,9 +58,13 @@
 
 
     public Entry getEntry(Collection col, Key key) {
+        final CacheKey ckey = new CacheKey(col, key);
         Entry e;
         synchronized (table) {
-            e = (Entry) table.get(new CacheKey(col, key));
+            e = (Entry) table.get(ckey);
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("Get " + ckey + ": " + (e == null ? "MISS" : "HIT"));
         }
         if (e == null) {
             return null;
@@ -92,7 +96,6 @@
             default:
                 throw new IllegalStateException("Invalid cache entry type: <" + e.getEntryType() + ">");
         }
-
     }
 
     public Entry getEntryMeta(Collection col, Key key) {