What are some good examples where you should configure Grails default cache settings?

These are the default Hibernate settings in Grails (found in conf/DataSource.groovy):

hibernate {
    cache.use_second_level_cache = true
    cache.use_query_cache = true
    cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
}

What are some good examples of circumstances in which I would like to:

  • disable second level cache
  • disable query cache or
  • change default cache provider ( EhCacheProvider)?
+3
source share
2 answers

In our project, we use the Datasources plug-in to connect to another database. This database is managed by a different system, so we cannot cache these classes, because we have no way to know when they are updated, so for this data source we disabled the second level cache and query cache. Just an example.

+2

. IMHO .

, , , grails, , /.

+3

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


All Articles