final int expirationTime = cacheControl.getExpirationTime();
CachedPortletData newData = new CachedPortletData();
newData.setExpirationTimeSeconds(expirationTime);
newData.setTimeStored(new Date());
newData.setStringData(content);
<BUG>newData.setEtag(cacheControl.getETag());
if(cacheControl.isPublicScope()) {
newData.setCacheConfigurationMaxTTL(new Long(publicScopePortletRenderOutputCache.getCacheConfiguration().getTimeToLiveSeconds()).intValue());

Serializable publicCacheKey = generatePublicScopePortletDataCacheKey(definitionId, portletWindow.getRenderParameters(), portletWindow.getPublicRenderParameters(), RequestContextUtils.getLocale(httpRequest));</BUG>
Element publicCacheElement = constructCacheElement(publicCacheKey, newData, publicScopePortletRenderOutputCache.getCacheConfiguration(), cacheControl);

final int expirationTime = cacheControl.getExpirationTime();
CachedPortletData newData = new CachedPortletData();
newData.setExpirationTimeSeconds(expirationTime);
newData.setTimeStored(new Date());
newData.setStringData(content);
newData.setEtag(cacheControl.getETag());
final Locale locale = RequestContextUtils.getLocale(httpRequest);
final PublicPortletCacheKey publicCacheKey = new PublicPortletCacheKey(definitionId, portletWindow, locale);
if(cacheControl.isPublicScope()) {
newData.setCacheConfigurationMaxTTL((int)publicScopePortletRenderOutputCache.getCacheConfiguration().getTimeToLiveSeconds());
