adds null check to MemberGroupCacheRefresher

This commit is contained in:
Shannon
2014-03-12 10:04:33 +11:00
parent 693899935b
commit c8ff708a43

View File

@@ -105,9 +105,12 @@ namespace Umbraco.Web.Cache
payloads.ForEach(payload =>
{
ApplicationContext.Current.ApplicationCache.RuntimeCache
.ClearCacheByKeySearch(string.Format("{0}.{1}", typeof(IMemberGroup).FullName, payload.Name));
RuntimeCacheProvider.Current.Delete(typeof(IMemberGroup), payload.Id);
if (payload != null)
{
ApplicationContext.Current.ApplicationCache.RuntimeCache
.ClearCacheByKeySearch(string.Format("{0}.{1}", typeof(IMemberGroup).FullName, payload.Name));
RuntimeCacheProvider.Current.Delete(typeof(IMemberGroup), payload.Id);
}
});
}