views:

26

answers:

1

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