Fixes: #U4-1978 - Creates DomainCacheRefresher - domain cache is now refreshed across all servers
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using umbraco;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
|
||||
namespace Umbraco.Web.Cache
|
||||
{
|
||||
@@ -278,6 +279,26 @@ namespace Umbraco.Web.Cache
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Domain Cache
|
||||
|
||||
public static void RefreshDomainCache(this DistributedCache dc, Domain domain)
|
||||
{
|
||||
if (domain != null)
|
||||
{
|
||||
dc.Refresh(new Guid(DistributedCache.DomainCacheRefresherId), domain.Id);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveDomainCache(this DistributedCache dc, Domain domain)
|
||||
{
|
||||
if (domain != null)
|
||||
{
|
||||
dc.Remove(new Guid(DistributedCache.DomainCacheRefresherId), domain.Id);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Language Cache
|
||||
|
||||
public static void RefreshLanguageCache(this DistributedCache dc, ILanguage language)
|
||||
|
||||
Reference in New Issue
Block a user