//Private key can be null if getPortletState found publicly cached data but the portlet's response is now privately scoped
if (privateCacheKey == null) {
final HttpSession session = httpRequest.getSession();
final String sessionId = session.getId();
final IPortletEntityId entityId = portletWindow.getPortletEntityId();
final PublicPortletCacheKey publicCacheKey = cacheState.getPublicPortletCacheKey();
privateCacheKey = new PrivatePortletCacheKey(sessionId, portletWindowId, entityId, publicCacheKey);
}
this.cacheElement(privateOutputCache, privateCacheKey, cachedPortletData, cacheControl);