问题
I'm working with a grails application deployed in tomcat6, and I want to be able to enable or disable server side page caching on a "page by page" basis. In other words, I want to be able to specify, "Cache page A, but do not cache pages B and C."
Is such a thing possible? If so, what is the best way to do this?
Thanks in advance.
回答1:
The Spring Cache plugin lets you cache controller actions and service method calls, so you could annotate the cacheable pages/actions and leave the ones that shouldn't be cached un-annotated: http://grails.org/plugin/springcache
来源:https://stackoverflow.com/questions/10195690/control-server-side-caching-by-page-tomcat