/** * Override to control cache headers. By default for all skin resources a Cache-Control: public, * Expires of one month and lastModified header is used. */ protected void addCacheHeaders(ResponseBuilder resp, URLConnection conn, String path) throws IOException { final Date afterOneMonth = new Date(System.currentTimeMillis() + 2678400000L); long lastModified = conn.getLastModified(); resp.lastModified(new Date(lastModified)) .header("Cache-Control", "public") .expires(afterOneMonth); }