paulsp 02/02/04 19:08:05
Modified: docs/site changes.html portlet_config_common.html
src/java/org/apache/jetspeed/portal/portlets
AbstractPortlet.java
src/java/org/apache/jetspeed/portal/security/portlets
CacheablePortletWrapper.java
CacheableStatefulPortletWrapper.java
src/java/org/apache/jetspeed/services/portletcache
Cacheable.java JetspeedPortletCacheService.java
webapp/WEB-INF/conf JetspeedResources.properties
xdocs changes.xml portlet_config_common.xml
Log:
Fix - Cache uppdates (part 2) (PS)
o The Abstract portlet is now refreshable. This means the caching system will call
refresh() when the portlet memory cache expires and portlet has not been idle
longer then TimeToLive.
o JetspeedPortletCacheService creates the appropiate cache container, CachedObject
or RefreshableCachedObject, for the item being cached.
o JetspeedPortletCacheService set the TimeToLive for Refreshable item based on the
JR.p property servics.PortletCache.TimeToLive.default.
o JetspeedPortletCacheService sets the TimeToLive for AbstractPortlets using the
parameter _TimeToLive, if present.
o Method have been added to various classes to support the updates to the memory
caching.
Revision Changes Path
1.9 +26 -1 jakarta-jetspeed/docs/site/changes.html
Index: changes.html
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/docs/site/changes.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- changes.html 2 Feb 2002 05:25:01 -0000 1.8
+++ changes.html 5 Feb 2002 03:08:04 -0000 1.9
@@ -197,7 +197,32 @@
<li>Update TestTurbineCache to include turbine fixes and enhancements</li>
</ul>
</li>
- </ul>
+<li>
+ Fix - Cache uppdates (part 2) (PS)
+ <ul>
+ <li>
+ The Abstract portlet is now refreshable. This means the caching system
+ will call refresh() when the portlet memory cache expires and portlet has
not
+ been idle longer then TimeToLive.
+ </li>
+ <li>
+ JetspeedPortletCacheService creates the appropiate cache container,
CachedObject
+ or RefreshableCachedObject, for the item being cached.
+ </li>
+ <li>
+ JetspeedPortletCacheService set the TimeToLive for Refreshable item based
on the
+ JR.p property servics.PortletCache.TimeToLive.default.
+ </li>
+ <li>
+ JetspeedPortletCacheService sets the TimeToLive for AbstractPortlets using
the
+ parameter _TimeToLive, if present.
+ </li>
+ <li>
+ Method have been added to various classes to support the updates to the
memory caching.
+ </li>
+ </ul>
+</li>
+ </ul>
</blockquote>
</p>
</td></tr>
1.9 +57 -0 jakarta-jetspeed/docs/site/portlet_config_common.html
Index: portlet_config_common.html
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/docs/site/portlet_config_common.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- portlet_config_common.html 2 Feb 2002 03:29:43 -0000 1.8
+++ portlet_config_common.html 5 Feb 2002 03:08:05 -0000 1.9
@@ -579,6 +579,63 @@
</font>
</td>
</tr>
+ <tr>
+ <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+ _TimeToLive
+ </font>
+</td>
+ <td bgcolor="#a0ddf0" colspan="" rowspan=""
valign="top" align="left">
+ <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+
+ How long, in milliseconds, should the portlet remain idle
+ in cache. This parameter is used to override the default value.
+ <p>
+ Example: _TimeToLive = 300000 which is 5 minutes (5 * 60 * 1000)
+ and the portlet cached expires every 3 minutes.
+ </p>
+ <table>
+ <tr valign="top">
+ <th>Time</th>
+ <th>Activity</th>
+ </tr>
+ <tr valign="top">
+ <td>1:00</td>
+ <td>Portlet created</td>
+ </tr>
+ <tr valign="top">
+ <td>1:00</td>
+ <td>User Joe displayed the portlet content</td>
+ </tr>
+ <tr valign="top">
+ <td>1:03</td>
+ <td>Portlet marked as expired, the portlet's refresh() is called, the
portlet is no longer expired</td>
+ </tr>
+ <tr valign="top">
+ <td>1:05</td>
+ <td>User Sam displayed the portlet content</td>
+ </tr>
+ <tr valign="top">
+ <td>1:06</td>
+ <td>Portlet marked as expired, the portlet's refresh() is called, the
portlet is no longer expired</td>
+ </tr>
+ <tr valign="top">
+ <td>1:09</td>
+ <td>Portlet marked as expired, the portlet's refresh() is called, the
portlet is no longer expired</td>
+ </tr>
+ <tr valign="top">
+ <td>1:12</td>
+ <td>Portlet marked as expired. Since the portlet has been idle for 7
minutes, the portlet will be removed from cache.</td>
+ </tr>
+ </table>
+ <p>
+ This parameter can be set in PSML or in the .xreg files.
+ </p>
+ <p>This parameter was added in version 1.3a3.</p>
+
+ </font>
+</td>
+ </tr>
</table>
</blockquote>
</p>
1.52 +46 -2
jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java
Index: AbstractPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- AbstractPortlet.java 28 Jan 2002 11:25:49 -0000 1.51
+++ AbstractPortlet.java 5 Feb 2002 03:08:05 -0000 1.52
@@ -81,6 +81,7 @@
//turbine stuff
import org.apache.turbine.services.cache.CachedObject;
+import org.apache.turbine.services.cache.Refreshable;
import org.apache.turbine.util.Log;
import org.apache.turbine.util.RunData;
@@ -105,9 +106,9 @@
@author <A HREF="mailto:[EMAIL PROTECTED]">Kevin A. Burton</A>
@author <A HREF="mailto:[EMAIL PROTECTED]">Rapha�l Luta</A>
@author <A HREF="mailto:[EMAIL PROTECTED]">Santiago Gala</A>
-@version $Id: AbstractPortlet.java,v 1.51 2002/01/28 11:25:49 sgala Exp $
+@version $Id: AbstractPortlet.java,v 1.52 2002/02/05 03:08:05 paulsp Exp $
*/
-public abstract class AbstractPortlet implements Portlet, PortletState, Cacheable
+public abstract class AbstractPortlet implements Portlet, PortletState, Cacheable,
Refreshable
{
private boolean cacheable = true;
@@ -141,6 +142,11 @@
private long creationTime;
/**
+ * Handle to cached object
+ */
+ private CachedObject cachedObject = null;
+
+ /**
*/
protected void clearContent() {
this.content.clear();
@@ -177,6 +183,25 @@
/*
+ * Implement methods required by Refreshable
+ */
+
+ /**
+ * Usually called by caching system when portlet is marked as expired, but
+ * has not be idle longer then TimeToLive.
+ *
+ * This method should be implement in cachable portlets
+ */
+ public void refresh() {
+ /*
+ * The following message is here to add in debugging. It is
+ * expected the any portlet type that is refreshable will
+ * implement this method.
+ */
+ Log.debug( "AbstractPortlet - Refreshing " + this.getName() );
+ }
+
+ /*
* Implement methods required by Cacheable
*/
@@ -259,6 +284,15 @@
*/
public void setExpirationMillis( long expirationMillis) {
this.expirationMillis = new Long(expirationMillis);
+
+ if (cachedObject != null) {
+ long expirationInterval = this.expirationMillis.longValue() -
cachedObject.getCreated();
+ if (expirationInterval > 0) {
+ cachedObject.setExpires(expirationInterval);
+ } else {
+ cachedObject.setStale(true);
+ }
+ }
}
/**
@@ -266,6 +300,7 @@
* config object.
*
* @param config The configuration object to use for building the handle
+ *
* @return A cache handle
*/
public static Object getHandle(Object config)
@@ -302,6 +337,15 @@
}
return handle.toString();
+ }
+
+ /**
+ * Set this portlet's cached object.
+ *
+ * @param cachedObject Cached Object associated to this portlet
+ */
+ public void setCachedObject(CachedObject cachedObject) {
+ this.cachedObject = cachedObject;
}
/*
1.2 +17 -3
jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/CacheablePortletWrapper.java
Index: CacheablePortletWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/CacheablePortletWrapper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CacheablePortletWrapper.java 21 Jan 2002 18:15:11 -0000 1.1
+++ CacheablePortletWrapper.java 5 Feb 2002 03:08:05 -0000 1.2
@@ -62,6 +62,8 @@
import org.apache.jetspeed.services.JetspeedSecurity;
+// Turbine
+import org.apache.turbine.services.cache.CachedObject;
import org.apache.turbine.util.RunData;
@@ -71,7 +73,7 @@
</p>
@author <A HREF="mailto:[EMAIL PROTECTED]">Santiago Gala</A>
-@version $Id: CacheablePortletWrapper.java,v 1.1 2002/01/21 18:15:11 sgala Exp $
+@version $Id: CacheablePortletWrapper.java,v 1.2 2002/02/05 03:08:05 paulsp Exp $
*/
public class CacheablePortletWrapper extends PortletWrapper implements
/*FIXME*/Cacheable
{
@@ -144,11 +146,23 @@
/**
- @see Cacheable#setExpirationMillis
- */
+ * @see Cacheable#setExpirationMillis
+ */
public void setExpirationMillis( long expirationMillis)
{
wrappedCacheable.setExpirationMillis( expirationMillis );
}
+ /**
+ * This allows the associated CachedObject to be
+ * known. One use of the <CODE>cachedObject</CODE> is to
+ * set the expiration time
+ *
+ * @param cachedObject Handle to the CachedObject
+ */
+ public void setCachedObject(CachedObject cachedObject)
+ {
+ wrappedCacheable.setCachedObject( cachedObject );
+ }
+
}
1.2 +14 -2
jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/CacheableStatefulPortletWrapper.java
Index: CacheableStatefulPortletWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/CacheableStatefulPortletWrapper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CacheableStatefulPortletWrapper.java 21 Jan 2002 18:15:11 -0000 1.1
+++ CacheableStatefulPortletWrapper.java 5 Feb 2002 03:08:05 -0000 1.2
@@ -60,17 +60,17 @@
import org.apache.jetspeed.services.portletcache.Cacheable;
import org.apache.jetspeed.services.JetspeedSecurity;
+import org.apache.turbine.services.cache.CachedObject;
import org.apache.turbine.util.RunData;
-
/**
<p>
This object is used to wrap a Portlet, ensuring that access control rules are
enforced.
</p>
@author <A HREF="mailto:[EMAIL PROTECTED]">Santiago Gala</A>
-@version $Id: CacheableStatefulPortletWrapper.java,v 1.1 2002/01/21 18:15:11 sgala
Exp $
+@version $Id: CacheableStatefulPortletWrapper.java,v 1.2 2002/02/05 03:08:05 paulsp
Exp $
*/
public class CacheableStatefulPortletWrapper extends StatefulPortletWrapper
implements /*FIXME*/Cacheable
{
@@ -148,6 +148,18 @@
public void setExpirationMillis( long expirationMillis)
{
wrappedCacheable.setExpirationMillis( expirationMillis );
+ }
+
+ /**
+ * This allows the associated CachedObject to be
+ * known. One use of the <CODE>cachedObject</CODE> is to
+ * set the expiration time
+ *
+ * @param cachedObject Handle to the CachedObject
+ */
+ public void setCachedObject(CachedObject cachedObject)
+ {
+ wrappedCacheable.setCachedObject( cachedObject );
}
}
1.6 +9 -1
jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletcache/Cacheable.java
Index: Cacheable.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletcache/Cacheable.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Cacheable.java 18 Jan 2002 23:31:37 -0000 1.5
+++ Cacheable.java 5 Feb 2002 03:08:05 -0000 1.6
@@ -55,6 +55,7 @@
package org.apache.jetspeed.services.portletcache;
import org.apache.jetspeed.portal.expire.Expire;
+import org.apache.turbine.services.cache.CachedObject;
/**
* <p>This is an interface for defining Jetspeed objects that may be
@@ -64,7 +65,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Rapha�l Luta</a>
- * @version $Id: Cacheable.java,v 1.5 2002/01/18 23:31:37 paulsp Exp $
+ * @version $Id: Cacheable.java,v 1.6 2002/02/05 03:08:05 paulsp Exp $
*/
public interface Cacheable
{
@@ -127,4 +128,11 @@
*/
public void setExpirationMillis( long expirationMillis);
+ /**
+ * This allows the associated CachedObject to be
+ * known. One use of the <code>co</code> is to set the expiration time
+ *
+ * @param co Handle to the CachedObject
+ */
+ public void setCachedObject(CachedObject co);
}
1.7 +69 -30
jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletcache/JetspeedPortletCacheService.java
Index: JetspeedPortletCacheService.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletcache/JetspeedPortletCacheService.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JetspeedPortletCacheService.java 17 Dec 2001 15:32:28 -0000 1.6
+++ JetspeedPortletCacheService.java 5 Feb 2002 03:08:05 -0000 1.7
@@ -55,41 +55,62 @@
package org.apache.jetspeed.services.portletcache;
import javax.servlet.ServletConfig;
+
+// Jetspeed
+import org.apache.jetspeed.portal.portlets.AbstractPortlet;
+import org.apache.jetspeed.services.resources.JetspeedResources;
+import org.apache.jetspeed.services.portletcache.Cacheable;
+
+// Turbine
import org.apache.turbine.util.Log;
import org.apache.turbine.services.TurbineBaseService;
+import org.apache.turbine.services.TurbineServices;
import org.apache.turbine.services.cache.CachedObject;
+import org.apache.turbine.services.cache.Refreshable;
+import org.apache.turbine.services.cache.RefreshableCachedObject;
import org.apache.turbine.services.cache.ObjectExpiredException;
/**
* <P>This implementation of the PortletCache service is a simple adapter to
* the Turbine GlobalCacheService</p>
- *
+ *
* @author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Rapha�l Luta</a>
- * @version $Id: JetspeedPortletCacheService.java,v 1.6 2001/12/17 15:32:28 sgala
Exp $
+ * @author <a href="mailto:[EMAIL PROTECTED]">Paul Spencer</a>
+ * @version $Id: JetspeedPortletCacheService.java,v 1.7 2002/02/05 03:08:05 paulsp
Exp $
*/
-public class JetspeedPortletCacheService
- extends TurbineBaseService
- implements PortletCacheService {
-
+public class JetspeedPortletCacheService
+extends TurbineBaseService
+implements PortletCacheService {
+
+ private static int DefaultTimeToLiveMillis =
(JetspeedResources.getInt(TurbineServices.SERVICE_PREFIX
+ + PortletCacheService.SERVICE_NAME
+ + ".TimeToLive.default", (30 * 60 * 1000))); // 30 minutes
+
/**
* Called during Turbine.init()
*
* @param config A ServletConfig.
*/
- public void init( ServletConfig config )
- {
- try
- {
- Log.info ( "JetspeedPortletCacheService early init()....starting!");
+ public void init( ServletConfig config ) {
+ try {
+ Log.info( "JetspeedPortletCacheService early init()....starting!");
+ if (DefaultTimeToLiveMillis < 0) {
+ Log.info( "JetspeedPortletCacheService - By default refreshable
objects will live for ever");
+ } else {
+ Log.info( "JetspeedPortletCacheService - By default refreshable
objects will be removed after "
+ + DefaultTimeToLiveMillis + " Millis ( "
+ + (DefaultTimeToLiveMillis/(1000*60)) + " minutes "
+ + ((DefaultTimeToLiveMillis%(1000*60))/1000.00)
+ + " Seconds "+")" );
+ }
// no specific init required, relies on GlobalCacheService
- Log.info ( "JetspeedPortletCacheService early init()....finished!");
+ Log.info( "JetspeedPortletCacheService early init()....finished!");
}
- catch (Exception e)
- {
- Log.error ( "Cannot initialize JetspeedPortletCacheService!" );
- Log.error (e);
+ catch (Exception e) {
+ Log.error( "Cannot initialize JetspeedPortletCacheService!" );
+ Log.error(e);
}
setInit(true);
}
@@ -100,36 +121,54 @@
* @param item the object to store in the Cache
*/
public void addCacheable( Cacheable item ) {
-
+
String handle = item.getHandle();
-
+
if ( handle.length() == 0 ) {
throw new RuntimeException("You must specify a handle for the item you
want to cache.");
}
if ( item.isCacheable() ) {
+ CachedObject cachedObject = null;
Long expirationMillis = item.getExpirationMillis();
if (expirationMillis != null) {
- // Only cache objects that have not expired.
- if (System.currentTimeMillis() < expirationMillis.longValue()) {
- GlobalCache.addObject( handle, new CachedObject( item,
expirationMillis.longValue() - System.currentTimeMillis()) );
- }
+ if (System.currentTimeMillis() < expirationMillis.longValue()) {
+ cachedObject.setExpires(expirationMillis.longValue() -
cachedObject.getCreated());
+ }
+ }
+ if (item instanceof Refreshable) {
+ RefreshableCachedObject rco = new RefreshableCachedObject(
(Refreshable) item);
+ if (item instanceof AbstractPortlet) {
+ AbstractPortlet portlet = (AbstractPortlet)item;
+ String tempString =
portlet.getPortletConfig().getInitParameter("_TimeToLive");
+ if (tempString != null) {
+ rco.setTTL(Integer.parseInt(tempString));
+ } else {
+ rco.setTTL(DefaultTimeToLiveMillis);
+ }
+ } else {
+ rco.setTTL(DefaultTimeToLiveMillis);
+ }
+ cachedObject = rco;
+
} else {
- // Oject will be cached Turbine "cachedobject.defaultage"
- GlobalCache.addObject( handle, new CachedObject( item ) );
+ cachedObject = new CachedObject(item);
}
- }
-
+ item.setCachedObject(cachedObject);
+ // Add object to cache
+ GlobalCache.addObject( handle , cachedObject);
+ }
}
/**
* Removes an object from the cache based on its handle
*
* @see PortletCacheService#removeCacheable
+ * @param handle the identifier of the object we wish to retrieve
*/
public void removeCacheable( String handle ) {
-
+
CachedObject obj = null;
try {
@@ -150,7 +189,7 @@
* @return the cacehd object or null if not found
*/
public Cacheable getCacheable( String handle ) {
-
+
CachedObject obj = null;
try {
@@ -163,11 +202,11 @@
//Log.info( "cache miss: " + handle );
return null;
} /*else {
- Log.info( "cache hit: " + handle );
+ Log.info( "cache hit: " + handle );
} */
return (Cacheable)obj.getContents();
-
+
}
}
1.59 +8 -3
jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties
Index: JetspeedResources.properties
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- JetspeedResources.properties 17 Jan 2002 11:32:34 -0000 1.58
+++ JetspeedResources.properties 5 Feb 2002 03:08:05 -0000 1.59
@@ -1,7 +1,7 @@
################################################################################
# Jetspeed Configuration
# Author: Kevin A. Burton ([EMAIL PROTECTED])
-# $Id: JetspeedResources.properties,v 1.58 2002/01/17 11:32:34 sgala Exp $
+# $Id: JetspeedResources.properties,v 1.59 2002/02/05 03:08:05 paulsp Exp $
################################################################################
# This is the main file you will need to configuration Jetspeed. If there are
# any secondary files they will be pointed to from this file.
@@ -67,8 +67,6 @@
cache.default.expiration=900
-
-
#########################################
# Temporary Storage #
#########################################
@@ -346,7 +344,14 @@
#########################################
services.PortletFactory.classname=org.apache.jetspeed.services.portletfactory.JetspeedPortletFactoryService
services.PortletFactory.enable.cache=true
+
+#########################################
+# Portlet Cache #
+#########################################
+# TimeToLive.default = number of milliseconds an unused portlet will remain in
cache.
+# Default 2700000 which is 45 minutes (45 * 60 * 1000)
services.PortletCache.classname=org.apache.jetspeed.services.portletcache.JetspeedPortletCacheService
+services.PortletCache.TimeToLive.default=2700000
#########################################
# Portal Service #
1.17 +27 -2 jakarta-jetspeed/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- changes.xml 2 Feb 2002 05:25:00 -0000 1.16
+++ changes.xml 5 Feb 2002 03:08:05 -0000 1.17
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
-$Id: changes.xml,v 1.16 2002/02/02 05:25:00 paulsp Exp $
+$Id: changes.xml,v 1.17 2002/02/05 03:08:05 paulsp Exp $
-->
<document>
<properties>
@@ -93,7 +93,32 @@
<li>Update TestTurbineCache to include turbine fixes and enhancements</li>
</ul>
</li>
- </ul>
+<li>
+ Fix - Cache uppdates (part 2) (PS)
+ <ul>
+ <li>
+ The Abstract portlet is now refreshable. This means the caching system
+ will call refresh() when the portlet memory cache expires and portlet has
not
+ been idle longer then TimeToLive.
+ </li>
+ <li>
+ JetspeedPortletCacheService creates the appropiate cache container,
CachedObject
+ or RefreshableCachedObject, for the item being cached.
+ </li>
+ <li>
+ JetspeedPortletCacheService set the TimeToLive for Refreshable item based
on the
+ JR.p property servics.PortletCache.TimeToLive.default.
+ </li>
+ <li>
+ JetspeedPortletCacheService sets the TimeToLive for AbstractPortlets using
the
+ parameter _TimeToLive, if present.
+ </li>
+ <li>
+ Method have been added to various classes to support the updates to the
memory caching.
+ </li>
+ </ul>
+</li>
+ </ul>
</section>
</body>
</document>
1.6 +50 -0 jakarta-jetspeed/xdocs/portlet_config_common.xml
Index: portlet_config_common.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/xdocs/portlet_config_common.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- portlet_config_common.xml 29 Dec 2001 14:34:36 -0000 1.5
+++ portlet_config_common.xml 5 Feb 2002 03:08:05 -0000 1.6
@@ -277,6 +277,56 @@
</table>
</td>
</tr>
+
+ <tr>
+ <td>_TimeToLive</td>
+ <td>
+ How long, in milliseconds, should the portlet remain idle
+ in cache. This parameter is used to override the default value.
+ <p>
+ Example: _TimeToLive = 300000 which is 5 minutes (5 * 60 * 1000)
+ and the portlet cached expires every 3 minutes.
+ </p>
+ <table>
+ <tr valign="top">
+ <th>Time</th>
+ <th>Activity</th>
+ </tr>
+ <tr valign="top">
+ <td>1:00</td>
+ <td>Portlet created</td>
+ </tr>
+ <tr valign="top">
+ <td>1:00</td>
+ <td>User Joe displayed the portlet content</td>
+ </tr>
+ <tr valign="top">
+ <td>1:03</td>
+ <td>Portlet marked as expired, the portlet's refresh() is called, the
portlet is no longer expired</td>
+ </tr>
+ <tr valign="top">
+ <td>1:05</td>
+ <td>User Sam displayed the portlet content</td>
+ </tr>
+ <tr valign="top">
+ <td>1:06</td>
+ <td>Portlet marked as expired, the portlet's refresh() is called, the
portlet is no longer expired</td>
+ </tr>
+ <tr valign="top">
+ <td>1:09</td>
+ <td>Portlet marked as expired, the portlet's refresh() is called, the
portlet is no longer expired</td>
+ </tr>
+ <tr valign="top">
+ <td>1:12</td>
+ <td>Portlet marked as expired. Since the portlet has been idle for 7
minutes, the portlet will be removed from cache.</td>
+ </tr>
+ </table>
+ <p>
+ This parameter can be set in PSML or in the .xreg files.
+ </p>
+ <p>This parameter was added in version 1.3a3.</p>
+ </td>
+ </tr>
</table>
</section>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>