Hibernate 2nd level cache in a Grails app
问题 Part I In a Grails app, I understand that you enable the 2nd level cache per domain class by adding static mapping { cache true } By default the 2nd level cache is only used when get() is called, but it can also be used for criteria queries and dynamic finders by adding cache true to the query. However, I'm still not sure I understand how the query cache works. My best guess is that: there are separate query caches for each domain class, e.g. one for Book and another for Author before a query