Web.PublishedCache - create, migrate

This commit is contained in:
Stephan
2013-02-05 06:31:13 -01:00
parent 4c3d2c10ac
commit ef9ce720b2
49 changed files with 427 additions and 335 deletions

View File

@@ -444,7 +444,7 @@ namespace Umbraco.Web.Routing
else
{
// redirect to another page
var node = _routingContext.PublishedContentStore.GetDocumentById(_routingContext.UmbracoContext, internalRedirectId);
var node = _routingContext.PublishedContentCache.GetById(_routingContext.UmbracoContext, internalRedirectId);
_pcr.SetInternalRedirectPublishedContent(node); // don't use .PublishedContent here
if (node != null)
@@ -494,14 +494,14 @@ namespace Umbraco.Web.Routing
LogHelper.Debug<PublishedContentRequestEngine>("{0}Not logged in, redirect to login page", () => tracePrefix);
var loginPageId = Access.GetLoginPage(path);
if (loginPageId != _pcr.PublishedContent.Id)
_pcr.PublishedContent = _routingContext.PublishedContentStore.GetDocumentById(_routingContext.UmbracoContext, loginPageId);
_pcr.PublishedContent = _routingContext.PublishedContentCache.GetById(_routingContext.UmbracoContext, loginPageId);
}
else if (!Access.HasAccces(_pcr.PublishedContent.Id, user.ProviderUserKey))
{
LogHelper.Debug<PublishedContentRequestEngine>("{0}Current member has not access, redirect to error page", () => tracePrefix);
var errorPageId = Access.GetErrorPage(path);
if (errorPageId != _pcr.PublishedContent.Id)
_pcr.PublishedContent = _routingContext.PublishedContentStore.GetDocumentById(_routingContext.UmbracoContext, errorPageId);
_pcr.PublishedContent = _routingContext.PublishedContentCache.GetById(_routingContext.UmbracoContext, errorPageId);
}
else
{