grails « Cache « JPA Q&A

1. How to temporarily disable read-only 2nd level cache hibernate strategy in Grails?

In my grails application, some of my domain classes will never be changed by Users. However, some maintenance work is sometimes necessary, and administrator should be able to create/edit few instances from ...

2. Multiple Grails Applications create Ehcache conflicts

I am running multiple Grails Applications on one of my servers. I am using Grails 1.2.2. I am using the default cache configuration in DataSource.groovy. When I try and run two ...

3. Grails / GORM, Disable First-level Cache

Suppose I have the following Domain class mapping to a legacy table, utilizing read-only second-level cache, and having a transient field:

class DomainObject {
 static def transients = ['userId']

 Long id
 Long ...

4. Hibernate + EhCache =

I'm doing load test now. After approximate 900 requests i got this error:

[ 03.08.10 11:49:00.465] [Store org.hibernate.cache.StandardQueryCache Spool Thread] ERROR  - org.hibernate.cache.StandardQueryCacheCache: Failed to write element to disk 'sql: ...

5. Hibernate cache in grails domain class

I have a domain class in grails 1.5 that represents data from a table that seldom changes. How can I configure hibernate's cache so the class accesses the table let's say ...

6. Grails\Hibernate: To cache or not to cache?

What is the best caching policy in Hibernate\Grails. Cache all entities and queries or not and how to find best solution ? Here my hibernate config.

hibernate {
  cache.use_second_level_cache = true

7. clear hibernate cache of specific domain class

Imagine i have following class:

class Test {
   String name    
   static mapping = {
      cache true