Control server side caching by page (Tomcat)?

血红的双手。 提交于 2020-01-06 16:01:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!