1 24 package org.riotfamily.website.interceptor; 25 26 import javax.servlet.http.HttpServletRequest ; 27 import javax.servlet.http.HttpServletResponse ; 28 29 import org.riotfamily.common.web.util.ServletUtils; 30 import org.riotfamily.riot.security.AccessController; 31 import org.springframework.web.servlet.ModelAndView; 32 import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; 33 34 41 public class NoCacheHeaderInterceptor extends HandlerInterceptorAdapter { 42 43 public void postHandle(HttpServletRequest request, 44 HttpServletResponse response, Object handler, 45 ModelAndView modelAndView) throws Exception { 46 47 if (!response.isCommitted() && modelAndView != null 48 && AccessController.isAuthenticatedUser()) { 49 50 ServletUtils.setNoCacheHeaders(response); 51 } 52 } 53 } 54 | Popular Tags |