cachedEntry = null;
userContext.setAttribute(scopeKey, null);
}
}
ContentResponse fragment = cachedEntry != null ? cachedEntry.contentRef.getContent() : null;
// If no valid fragment we must invoke
if (fragment == null || cachedEntry.expirationTimeMillis < System.currentTimeMillis())
{
// Set validation token for revalidation only we have have a fragment
if (fragment != null)
{
renderInvocation.setValidationToken(cachedEntry.validationToken);
}
// Invoke
PortletInvocationResponse response = super.invoke(invocation);
// Try to cache any fragment result
CacheControl control = null;
if (response instanceof ContentResponse)
{
fragment = (ContentResponse)response;
control = fragment.getCacheControl();
}
else if (response instanceof RevalidateMarkupResponse)
{
RevalidateMarkupResponse revalidate = (RevalidateMarkupResponse)response;
control = revalidate.getCacheControl();