public CacheEntry getCacheEntry(String key) throws CacheException {
try {
misses++;
Element el = getCache().get(key);
if(el==null)throw new CacheException("there is no entry in cache with key ["+key+"]");
hits++;
misses--;
return new EHCacheEntry(el);
}
catch(IllegalStateException ise) {
throw new CacheException(ise.getMessage());
}
catch(net.sf.ehcache.CacheException ce) {
throw new CacheException(ce.getMessage());
}
}