cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/aspect/impl ActionCounterEventAspect.java
Date Tue, 16 Mar 2004 10:21:39 GMT
cziegeler    2004/03/16 02:21:39

  Modified:    src/blocks/portal/java/org/apache/cocoon/portal/event/aspect/impl
                        ActionCounterEventAspect.java
  Log:
  Force browser to not cache the portal page
  
  Revision  Changes    Path
  1.4       +8 -2      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/aspect/impl/ActionCounterEventAspect.java
  
  Index: ActionCounterEventAspect.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/aspect/impl/ActionCounterEventAspect.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ActionCounterEventAspect.java	5 Mar 2004 13:02:12 -0000	1.3
  +++ ActionCounterEventAspect.java	16 Mar 2004 10:21:39 -0000	1.4
  @@ -22,6 +22,7 @@
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
  +import org.apache.cocoon.environment.Response;
   import org.apache.cocoon.portal.PortalService;
   import org.apache.cocoon.portal.event.aspect.EventAspect;
   import org.apache.cocoon.portal.event.aspect.EventAspectContext;
  @@ -78,7 +79,12 @@
                   context.invokeNext( service );
               }
           }
  -        service.getComponentManager().getLinkService().addParameterToLink( requestParameterName,
String.valueOf(actionCount));        
  +        service.getComponentManager().getLinkService().addParameterToLink( requestParameterName,
String.valueOf(actionCount));
  +        
  +        final Response response = ObjectModelHelper.getResponse( context.getObjectModel()
);
  +        response.setHeader("Cache-Control", "no-cache");
  +        response.setHeader("Pragma", "no-cache");
  +        response.setHeader("Expires", "Thu, 01 Jan 2000 00:00:00 GMT");
   	}
   
   
  
  
  

Mime
View raw message