return null;
} else {
return (CachedPortletData) publicCacheElement.getValue();</BUG>
}
} else {
<BUG>Serializable privateCacheKey = generatePrivateScopePortletDataCacheKey(httpRequest, portletWindowId, entityId, definitionId, portletWindow.getRenderParameters());
Element privateCacheElement = this.privateScopePortletRenderOutputCache.get(privateCacheKey);</BUG>
if(privateCacheElement != null) {
<BUG>if(privateCacheElement.isExpired()) {
this.privateScopePortletRenderOutputCache.remove(privateCacheKey);
return null;
} else {
return (CachedPortletData) privateCacheElement.getValue();</BUG>
}

return null;
} else {
logger.debug("Returning publicly cached render output with key {} for {}", publicCacheKey, portletWindow);
return (CachedPortletData) publicCacheElement.getValue();
}
} else {
final PrivatePortletCacheKey privateCacheKey = new PrivatePortletCacheKey(httpRequest.getSession().getId(), portletWindowId, entityId, publicCacheKey);
Element privateCacheElement = this.privateScopePortletRenderOutputCache.get(privateCacheKey);
if(privateCacheElement != null) {
CachedPortletData cachedPortletData = (CachedPortletData) privateCacheElement.getValue();
if(privateCacheElement.isExpired() && StringUtils.isBlank(cachedPortletData.getEtag())) {
this.privateScopePortletRenderOutputCache.remove(privateCacheKey);
logger.debug("Privately cached render output for key {} is expired", privateCacheKey);
