mcardle 2005/06/23 11:56:15 CEST
Modified files:
src/view/jsp/include box_newslast5.inc
Log:
now displays when the cache will be updated next
lower cache time to 30 secs
Revision Changes Path
1.5 +4 -2
corporate_portal_templates/src/view/jsp/include/box_newslast5.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box_newslast5.inc.diff?r1=1.4&r2=1.5&f=h
Index: box_newslast5.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box_newslast5.inc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- box_newslast5.inc 13 Jun 2005 09:12:43 -0000 1.4
+++ box_newslast5.inc 23 Jun 2005 09:56:15 -0000 1.5
@@ -169,7 +169,7 @@
%>
<%
//This set the cache lifetime in seconds
- int cacheLifeTimeInSeconds = 350;//i.e. 5 mins
+ int cacheLifeTimeInSeconds = 30;//i.e. 30 secs, increase value
for better performance
if ( CacheUtil.getCacheLifetime(PageContext.APPLICATION_SCOPE,
pageContext)!=cacheLifeTimeInSeconds ) {
CacheUtil.setCacheLifetime(cacheLifeTimeInSeconds,
PageContext.APPLICATION_SCOPE, pageContext);
@@ -180,7 +180,9 @@
<%
Date now = new Date();
logger.debug("CACHE-ON: box_newslast5_cached.inc generated
at : "+ DateFormat.getTimeInstance().format(now));
- %>
+ Date ttl = new
Date(now.getTime()+cacheLifeTimeInSeconds*1000);
+ %>(Next Cache Update:
<%=DateFormat.getTimeInstance().format(ttl)%>)<%
+ %>
</cache:cache>
<% } else { %>
<%@ include file="box_newslast5_cached.inc"%>