Merge branch 'dev-v7-distcache' into 7.3.0

This commit is contained in:
Shannon
2015-04-01 14:00:13 +11:00
49 changed files with 2490 additions and 1837 deletions

View File

@@ -11,6 +11,7 @@ using System.Web.Mvc;
using System.Web.Routing;
using ClientDependency.Core.Config;
using Examine;
using umbraco;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.Dictionary;
@@ -37,6 +38,7 @@ using Umbraco.Web.Scheduling;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Web.WebApi;
using umbraco.BusinessLogic;
using GlobalSettings = Umbraco.Core.Configuration.GlobalSettings;
using ProfilingViewEngine = Umbraco.Core.Profiling.ProfilingViewEngine;
@@ -49,7 +51,7 @@ namespace Umbraco.Web
{
private readonly bool _isForTesting;
//NOTE: see the Initialize method for what this is used for
private List<IIndexer> _indexesToRebuild = new List<IIndexer>();
private readonly List<IIndexer> _indexesToRebuild = new List<IIndexer>();
public WebBootManager(UmbracoApplicationBase umbracoApplication)
: this(umbracoApplication, false)
@@ -324,13 +326,18 @@ namespace Umbraco.Web
//set the default RenderMvcController
DefaultRenderMvcControllerResolver.Current = new DefaultRenderMvcControllerResolver(typeof(RenderMvcController));
//Override the ServerMessengerResolver to set a username/password for the distributed calls
ServerMessengerResolver.Current.SetServerMessenger(new BatchedServerMessenger(() =>
ServerMessengerResolver.Current.SetServerMessenger(new BatchedWebServiceServerMessenger(() =>
{
//we should not proceed to change this if the app/database is not configured since there will
// be no user, plus we don't need to have server messages sent if this is the case.
if (ApplicationContext.IsConfigured && ApplicationContext.DatabaseContext.IsDatabaseConfigured)
{
//disable if they are not enabled
if (UmbracoConfig.For.UmbracoSettings().DistributedCall.Enabled == false)
{
return null;
}
try
{
var user = User.GetUser(UmbracoConfig.For.UmbracoSettings().DistributedCall.UserId);