U4-6797 - clear domains cache when deleting content
This commit is contained in:
@@ -5,6 +5,7 @@ using Umbraco.Core.Events;
|
||||
using Umbraco.Core.Models;
|
||||
using umbraco;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
|
||||
namespace Umbraco.Web.Cache
|
||||
{
|
||||
@@ -400,6 +401,12 @@ namespace Umbraco.Web.Cache
|
||||
dc.Remove(DistributedCache.DomainCacheRefresherGuid, domain.Id);
|
||||
}
|
||||
|
||||
public static void ClearDomainCacheOnCurrentServer(this DistributedCache dc)
|
||||
{
|
||||
var key = RepositoryBase.GetCacheTypeKey<IDomain>();
|
||||
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheByKeySearch(key);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Language Cache
|
||||
|
||||
Reference in New Issue
Block a user