@Override
public Object getValue(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+"]");
misses--;
hits++;
return el.getObjectValue();
}
catch(IllegalStateException ise) {
throw new CacheException(ise.getMessage());
}
catch(net.sf.ehcache.CacheException ce) {
throw new CacheException(ce.getMessage());
}
}