[
http://jira.jboss.com/jira/browse/JBPORTAL-1137?page=all ]
Julien Viet resolved JBPORTAL-1137.
-----------------------------------
Resolution: Done
no update since my last comment.
it has unit tests.
Programatic control of portlet caching behavior
-------------------------------------------------
Key: JBPORTAL-1137
URL:
http://jira.jboss.com/jira/browse/JBPORTAL-1137
Project: JBoss Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Portal Portlet
Affects Versions: 2.4 Final
Environment: Portal 2.4, JDK 1.5, WindowsXP
Reporter: Jerry Lacy
Assigned To: Julien Viet
Attempts to programatically alter the EXPIRATION_CACHE setting of a portlet from within
the doView() method has not effect.
e.g.
response.setProperty( RenderResponse.EXPIRATION_CACHE, "0" );
Unless I am missing something, it doesn't appear that this was implemented anywhere
(as of the 2.4 final release). I believe the problem is on line 65 of
org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(). The cache
expiration value is being updated on each request using the configured EXPIRATION_CACHE
value regardless of whether an EXPIRATION_CACHE property was set on the response. I added
the following test which seems to work based on what little testing I have done so far:
// Update the fragment cache info only if the value has not been overridden during render
processing
if ( fragmentResult.getProperties().getProperty(RenderResponse.EXPIRATION_CACHE) == null
) {
fragmentResult.setExpirationSecs(cacheInfo.getExpirationSecs());
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira