Hibernate default cache configuration for Grails

Grails 2.0.0 Reference Guide shows how the default Hibernate cache configuration

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 application, then you really get

 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 is between the two?

+4
source share
1 answer

CacheProvider is an obsolete, obsolete way to determine which second-level cache implementation to use, as indicated in its javadoc. A new way is to use the factory scope.

See http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/cache/package-summary.html for details.

+3
source

Source: https://habr.com/ru/post/1398046/


All Articles