updates more cache handling, fixes syntax error in examineindex.release.config, fixes the DefaultServerMessenger ctor
to be lazy since the db context isn't initialized yet (will speed up start a bit too), ensures that the macro/xslt caching clearing is only done on the single server instead or re-posing another distributed call.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using umbraco;
|
||||
|
||||
@@ -210,12 +211,21 @@ namespace Umbraco.Web.Cache
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears the cache for all macros
|
||||
/// Clears the cache for all macros on the current server
|
||||
/// </summary>
|
||||
/// <param name="dc"></param>
|
||||
public static void ClearAllMacroCache(this DistributedCache dc)
|
||||
public static void ClearAllMacroCacheOnCurrentServer(this DistributedCache dc)
|
||||
{
|
||||
dc.RefreshAll(new Guid(DistributedCache.MacroCacheRefresherId));
|
||||
//NOTE: The 'false' ensure that it will only refresh on the current server, not post to all servers
|
||||
dc.RefreshAll(new Guid(DistributedCache.MacroCacheRefresherId), false);
|
||||
}
|
||||
|
||||
public static void ClearXsltCacheOnCurrentServer(this DistributedCache dc)
|
||||
{
|
||||
if (UmbracoSettings.UmbracoLibraryCacheDuration > 0)
|
||||
{
|
||||
ApplicationContext.Current.ApplicationCache.ClearCacheObjectTypes("MS.Internal.Xml.XPath.XPathSelectionIterator");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user