U4-6797 - clear domains cache when deleting content

This commit is contained in:
Stephan
2015-10-16 17:21:44 +02:00
parent 3a5a32c65f
commit 64f05e4c97
2 changed files with 14 additions and 0 deletions

View File

@@ -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