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?
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.