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?
A:
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).
Jack Leow
2010-06-23 23:37:23
I'm trying to cache the entire response, on per-request basis. I guess I'd better delete reference to ST from my question.
Shooshpanchick
2010-06-24 07:57:12