How to best cache server responses on server side with Jetty and Spring?

I'm using embedded Jetty 6 and Spring Web. What is the best way to cache served pages in this setup to avoid regenerating them on every request?

Answers


What are you trying to cache exactly? If you're trying to reduce file I/O from constantly reading template content from disk, StringTemplateGroup automatically does this.

You can configure the caching settings (how frequently the cache is invalidated) by using StringTemplateGroup#setRefreshInteval(int).


Spring 3.1 supports a Cache Abstraction that can be used to cache web responses.


Need Your Help

which is the best treeview jquery plugin to use in MVC?

jquery asp.net-mvc treeview jstree

Which is the best treeview jquery plugin to use in MVC ?