Jetty has a CacheControl parameter (can be specified webdefault.xml) that determines the caching behavior of clients (by affecting headers sent to clients).
Does Tom
I don't believe there is a configuration to do this. But it should not be much of an effort to write a filter to set the Cache-Control header on a per webapp-basis. E.g.:
public class test implements Filter {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
chain.doFilter(request, response);
((StatusResponse)response).setHeader("Cache-Control",
"max-age=0, private, must-revalidate");
}
public void destroy() {}
public void init(FilterConfig arg0) throws ServletException {}
}
And you'd place this snippet into your webapp's web.xml file.
SetCacheControl
ch.dietpizza.cacheControlFilter
SetCacheControl
/*