Last updated by fletcherr 2 years ago
For Grails 1.2.0-M3 and up...
grails install-plugin springcache
For older Grails versions...
grails install-plugin springcache 1.0.1
Last updated by ldaley 1 year ago
Springcache Plugin
The Springcache plugin allows you to easily add the following functionality to your Grails project:
- Caching of Spring bean methods (typically Grails service methods).
- Caching of page fragments generated by Grails controllers.
- Cache flushing when Spring bean methods or controller actions are invoked.
The plugin depends on the
EhCache and
EhCache-Web libraries.
Plugin documentation is now hosted
here.
Last updated by fletcherr 2 years ago
Can I disable the plugin in testing environments?
Caching can be disabled with the config key
springcache.disabled = true which can be useful in some environments to avoid having methods you are testing returning cached results.
Can I see logging output from the plugin?
Set the logging level on
grails.plugin.springcache in your Config.groovy. Configuration details and cache hits and misses will be logged.
My cache config doesn't seem to be working.
Ensure all your config for the Springcache plugin is nested inside a single 'springcache' block in Config.groovy otherwise only the last block will take effect.
Last updated by admin 2 years ago