code: public static void addCacheHeaders(HttpServletResponse response, String etag,
  			Integer month) {
  		Assert.notNull(etag, "ETag must not be null");
  
  		long seconds;
  		if (month != null) {
  			seconds = month * secondsInAMonth;
  		}
  		else {
  			seconds = 6L * secondsInAMonth;
  		}
  
  		response.setDateHeader("Expires", System.currentTimeMillis() + seconds * 1000L);
  		response.setHeader("ETag", etag);
  		response.setHeader("Cache-Control", "public, max-age=" + seconds);
  	}
docs: Adds Expires, ETag and Cache-Control response headers.
  
  @param response the HTTP servlet response
  @param etag the calculated etag (md5) of the response
  @param month number of months the response can be cached. Added to the Expires and
  Cache-Control header. If null defaults to 6 months.