Servlet中使用 Last-Modified、Expires和Cache-Control
long now = System.currentTimeMillis();
long expires = System.currentTimeMillis() + (1000 * 60 * minutes);
response.addDateHeader("Expires", expires);
response.addDateHeader("Last-Modified", now);
response.setHeader("Cache-control", "public, max-age=" + minutes * 60);
http://www.360doc.com/content/13/0923/11/13247663_316436908.shtml#