Reputation: 187409
The Grails 2.0.0 reference manual shows the following as the default Hibernate cache config
hibernate {
cache.use_second_level_cache=true
cache.use_query_cache=true
cache.provider_class='org.hibernate.cache.EhCacheProvider'
}
But if you create a Grails 2.0.0 app, what you actually get is
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
Can someone explain what the difference between these two is?
Upvotes: 4
Views: 2109
Reputation: 692231
CacheProvider is a legacy, deprecated way of defining which second-level cache implementation to use, as indicated in its javadoc. The new way is to use a region factory.
See http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/cache/package-summary.html for details.
Upvotes: 3