If you have an entity that has an expensive (regarding cpu load) toString() method you find a serious performance penalty using the cache.
net.sf.ehcache.pool.impl.DefaultSizeOfEngine.java calls 'LOG.warn("value"+value);' using a NOPLogger even if you switch off log4j for everything.
org.hibernate.cache.spi.entry.StandardCacheEntryImpl.java contains a toString() method that is called from the above code and if you have like in mine case a blob object in your hibernate entity that uses an AbstractSingleValueConverter for conversion of an entity to xml that uses the toString() method you might get surprising performance problems. At least I am not aware of a warning in the documentation to overload toString() when using hibernate. The workaround seems to be simple, just do not use code within toString() that might be slow even if you never call it.
ehcache as cache