1 16 package org.apache.cocoon.portal.event.aspect.impl; 17 18 import org.apache.avalon.framework.logger.AbstractLogEnabled; 19 import org.apache.avalon.framework.thread.ThreadSafe; 20 import org.apache.cocoon.environment.ObjectModelHelper; 21 import org.apache.cocoon.environment.Response; 22 import org.apache.cocoon.portal.PortalService; 23 import org.apache.cocoon.portal.event.aspect.EventAspect; 24 import org.apache.cocoon.portal.event.aspect.EventAspectContext; 25 26 35 public class NoClientCachingEventAspect 36 extends AbstractLogEnabled 37 implements EventAspect, 38 ThreadSafe { 39 40 43 public void process(EventAspectContext context, PortalService service) { 44 45 final Response response = ObjectModelHelper.getResponse( context.getObjectModel() ); 46 response.setHeader("Cache-Control", "no-cache"); 47 response.addHeader("Cache-Control", "no-store"); 48 response.setHeader("Pragma", "no-cache"); 49 response.setHeader("Expires", "Thu, 01 Jan 2000 00:00:00 GMT"); 50 51 context.invokeNext(service); 52 } 53 } 54 | Popular Tags |