[jboss-cvs] jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet ...

Julien Viet julien at jboss.com
Tue Aug 1 09:57:44 EDT 2006


  User: julien  
  Date: 06/08/01 09:57:44

  Modified:    portlet/src/main/org/jboss/portal/portlet/aspects/portlet  
                        ConsumerCacheInterceptor.java
                        ProducerCacheInterceptor.java
  Log:
  - cms fixes
  - correct handling of -1 caching
  
  Revision  Changes    Path
  1.6       +4 -4      jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ConsumerCacheInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ConsumerCacheInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ConsumerCacheInterceptor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- ConsumerCacheInterceptor.java	31 Jul 2006 19:29:52 -0000	1.5
  +++ ConsumerCacheInterceptor.java	1 Aug 2006 13:57:44 -0000	1.6
  @@ -39,7 +39,7 @@
   
   /**
    * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public class ConsumerCacheInterceptor extends PortletInterceptor
   {
  @@ -102,13 +102,13 @@
   
                  // Compute expiration time
                  long expirationTimeMillis = 0;
  -               if (renderResult.getExpirationMillis() == -1)
  +               if (renderResult.getExpirationSecs() == -1)
                  {
                     expirationTimeMillis = Long.MAX_VALUE;
                  }
  -               else if (renderResult.getExpirationMillis() > 0)
  +               else if (renderResult.getExpirationSecs() > 0)
                  {
  -                  expirationTimeMillis = System.currentTimeMillis() + renderResult.getExpirationMillis();
  +                  expirationTimeMillis = System.currentTimeMillis() + renderResult.getExpirationSecs() * 1000;
                  }
   
                  // Cache if required
  
  
  
  1.2       +1 -1      jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ProducerCacheInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ProducerCacheInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/ProducerCacheInterceptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- ProducerCacheInterceptor.java	18 Jun 2006 03:25:09 -0000	1.1
  +++ ProducerCacheInterceptor.java	1 Aug 2006 13:57:44 -0000	1.2
  @@ -33,7 +33,7 @@
   
   /**
    * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ProducerCacheInterceptor extends PortletInterceptor
   {
  @@ -60,7 +60,7 @@
               CacheInfo cacheInfo = info.getCache();
   
               // Update the fragment cache info
  -            fragmentResult.setExpirationMillis(cacheInfo.getExpirationMillis());
  +            fragmentResult.setExpirationSecs(cacheInfo.getExpirationSecs());
            }
         }
         else
  
  
  



More information about the jboss-cvs-commits mailing list