[jboss-cvs] JBossCache/src-50/org/jboss/cache/pojo/util ...
Ben Wang
bwang at jboss.com
Mon Nov 6 22:57:03 EST 2006
User: bwang
Date: 06/11/06 22:57:03
Modified: src-50/org/jboss/cache/pojo/util CacheApiUtil.java
Log:
Checked if cacheloader is present, we don't skip the interceptor.
Revision Changes Path
1.2 +7 -1 JBossCache/src-50/org/jboss/cache/pojo/util/CacheApiUtil.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheApiUtil.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/util/CacheApiUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- CacheApiUtil.java 5 Sep 2006 06:11:25 -0000 1.1
+++ CacheApiUtil.java 7 Nov 2006 03:57:03 -0000 1.2
@@ -17,7 +17,7 @@
/** Utility for the 2.0 Cache API
*
* @author Ben Wang
- * @version $Id: CacheApiUtil.java,v 1.1 2006/09/05 06:11:25 bwang Exp $
+ * @version $Id: CacheApiUtil.java,v 1.2 2006/11/07 03:57:03 bwang Exp $
*/
public class CacheApiUtil
{
@@ -33,6 +33,12 @@
public static boolean exists(CacheSPI cache, Fqn fqn, Object key)
{
+ if(cache.getCacheLoader() != null)
+ {
+ // Has cache loader
+ return (cache.get(fqn, key) != null) ? true : false;
+ }
+
Node node = cache.getRoot().getChild(fqn);
if(node == null) return false;
Map map = node.getData();
More information about the jboss-cvs-commits
mailing list