// If we had a cached content that was revalidated we substitute
if (response instanceof RevalidateMarkupResponse && cachedContent != null)
{
// Normally we receive such response when the validation token was set which implies we have an existing content
// We substitute with the appropriate content response
RevalidateMarkupResponse revalidate = (RevalidateMarkupResponse)response;
CacheControl control = revalidate.getCacheControl();
if (cachedContent instanceof FragmentResponse)
{
response = new FragmentResponse((FragmentResponse)cachedContent, control);
}
else