GRAILS default Hibernate cache configuration

The Grails 2.0.0 reference manual shows the following as 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, 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 the difference between the two?

CacheProvider is a legacy and deprecated way to define the second Level cache implementation, as shown in its javadoc. The new method is to use regional factories.

For details, see http://docs.jboss.org/hibernate/core/3.6/javadocs/ org/hibernate/cache/package-summary.html.

The Grails 2.0.0 reference manual shows the following as 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, 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 both What is the difference between?

CacheProvider is a legacy and deprecated way to define the second-level cache implementation to be used, as shown in its javadoc. It is to use the regional factory.

For details, see http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/cache/package-summary.html.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4439 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.