/** * Sets caching headers with private cache control. Applications should call this method from urlrewrite.xml to * decorate urls like <code>/sp/{build num}/.../_/resourceurl</code>. * * @see <a href="http://tuckey.org/urlrewrite/manual/2.6/">http://tuckey.org/urlrewrite/manual/2.6/</a> */ public static void addPrivateCachingHeaders(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) { addCachingHeaders(httpServletRequest, httpServletResponse, "private"); } }
@Override public boolean execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ResourceDownloadUtils.addPublicCachingHeaders(request, response); request.setAttribute("_statichash", nonWebInfResourcesPatternMatcher.group(1)); request.getRequestDispatcher(rewrittenUriPath).forward(request, response); return true; } };
@Override public boolean execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ResourceDownloadUtils.addPublicCachingHeaders(request, response); request.setAttribute("cachingHeadersApplied", true); request.setAttribute("_statichash", nonWebInfResourcesPatternMatcher.group(1)); request.getRequestDispatcher(rewrittenUriPath).forward(request, response); return true; } };
/** * Sets caching headers with public cache control. Applications should call this method from urlrewrite.xml to * decorate urls like <code>/s/{build num}/.../_/resourceurl</code>. * * @see <a href="http://tuckey.org/urlrewrite/manual/2.6/">http://tuckey.org/urlrewrite/manual/2.6/</a> */ public static void addPublicCachingHeaders(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) { addCachingHeaders(httpServletRequest, httpServletResponse, "public"); }