Reputation: 50117
I'm curious about the support for database/GORM object caching provided by the Grails framework.
Upvotes: 2
Views: 1214
Reputation: 13475
3) We disabled disk cache overflow. Had to explicitly create ehcache.xml
for that, from ehcache-core-1.7.1.jar/ehcache-failsafe.xml
.
Disk cache overflow only made problems for us due to being slow and IO error prone.
Upvotes: 0
Reputation: 730
Grails uses Hibernate for GORM, so the database caching features are actually provided by Hibernate.
The Hibernate first level cache is enabled (which only lasts approximately the time of a user request). It can not be disabled.
The Hibernate second level cache is also enabled, but can be turned off by configuration. This cache will hold data for a long time (configurable by object type) unless something invalidates the data (an update)
For heavy-read applications, second-level cache should be enabled, you will save a lot of trips to your database, and it is 100% transparent to your application (almost no cost).
Regards,
Vincent
Upvotes: 5