}
//Get the portlet window
final HttpServletRequest httpServletRequest = portalControlStructures.getHttpServletRequest();
final IPortletWindowId portletWindowId = this.getPortletWindowId(channelStaticData, channelRuntimeData, portalControlStructures);
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(httpServletRequest, portletWindowId);
//If this window is targeted invalidate the cache
final PortletUrl portletUrl = this.portletRequestParameterManager.getPortletRequestInfo(httpServletRequest, portletWindowId);
if (portletUrl != null) {
return false;
}
final PortletDD portletDescriptor;
try {
portletDescriptor = this.getPortletDD(httpServletRequest, portletWindowId);
}
catch (PortletContainerException pce) {
this.logger.warn("Could not retrieve PortletDD for portlet window '" + portletWindowId + "' to determine caching configuration. Marking content cache invalid and continuing.", pce);
return false;
}
if (portletDescriptor == null) {
this.logger.warn("Could not retrieve PortletDD for portlet window '" + portletWindow + "' to determine caching configuration. Marking content cache invalid and continuing.");
return false;
}
//If the descriptor value is unset return immediately
final int descriptorExpirationCache = portletDescriptor.getExpirationCache();
if (descriptorExpirationCache == PortletDD.EXPIRATION_CACHE_UNSET) {
return false;
}
//Use value from window if it is set
final Integer windowExpirationCache = portletWindow.getExpirationCache();
final int expirationCache;
if (windowExpirationCache != null) {
expirationCache = windowExpirationCache;
}
else {