In Relation To Greg Luck

In Relation To Greg Luck

Ehcache 2.0, which was recently released, supports the new Hibernate 3.3/3.5 SPI with its CacheRegionFactory.

This new provider has the following benefits:

The SPI removed synchronization in the Hibernate cache plumbing. It is left up to the caching implementation on how to control concurrent access. Ehcache, starting with 1.6, removed syncrhonization in favour of a CAS approach. The results, for heavy workloads are impressive.

Ehcache 2.0 is readily distributable with Terracotta Server Array. This gives you cluster safe operation (coherency), HA and scale beyond the limits of an in-process cache, which is how most Hibernate users use Ehcache today. There is the existing ehcache.jar and ehcache-terracotta.jar which provides the client library. It is a couple of lines of config to turn that on in ehcache.xml: