开发者

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

开发者 https://www.devze.com 2023-01-04 23:38 出处:网络
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 req开发者_如何学Gouest?What are you trying to cache exactly? If

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 req开发者_如何学Gouest?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消