mcardle     2006/01/04 04:23:09 CET

  Modified files:
    src/org/jahia/esi    GetThread.java 
  Log:
  * ignores page invalidation urls
  
  Revision  Changes    Path
  1.17      +6 -2      esi_server/src/org/jahia/esi/GetThread.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/esi_server/src/org/jahia/esi/GetThread.java.diff?r1=1.16&r2=1.17&f=h
  
  
  
  Index: GetThread.java
  ===================================================================
  RCS file: /home/cvs/repository/esi_server/src/org/jahia/esi/GetThread.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- GetThread.java    23 Dec 2005 00:40:57 -0000      1.16
  +++ GetThread.java    4 Jan 2006 03:23:08 -0000       1.17
  @@ -129,7 +129,6 @@
                        String clientRequestUrl) {
           expirationInSecs = SettingsBean.getInstance().getDefaultExpiration();
           maxRemovalDelayInSecs = 
SettingsBean.getInstance().getDefaultMaxRemovalDelay();
  -
           this.clientRequestUrl = clientRequestUrl;
           this.httpClient = httpClient;
           this.methodToServer = methodToServer;
  @@ -529,6 +528,12 @@
                   this.expirationDateInSecs = 4;
               }
   
  +            //don't cache Url containing the following params:
  +            if (urlToServer.indexOf("esi=invalidateNow") !=-1 ) {
  +                this.expirationInSecs = 4;
  +                this.expirationDateInSecs = 4;
  +            }
  +
               fragmentCache.add ( urlKey  , methodToServer , 
finalContents.toString().getBytes()
                       , urlToServer,
                       refObjs, refObjsUrls,
  @@ -564,7 +569,6 @@
                       if (log.isDebugEnabled()) log.debug(id + " - about to 
get something from " + urlToServer );
                       // execute the methodToServer
                       statusCode = httpClient.executeMethod(methodToServer);
  -
                       // TODO: CHECK CONTENT TYPE should go here so that if 
the content is binary and too big,
                       // then we just do a passthrough. If it's just binary 
and small enough to cache
                       // we do a passthroughAndCache.
  

Reply via email to