Register notifications for DistributedCacheBinder
This commit is contained in:
@@ -189,14 +189,18 @@ namespace Umbraco.Cms.Core.Cache
|
||||
|
||||
public void Handle(DataTypeSavedNotification notification)
|
||||
{
|
||||
foreach (var entity in notification.SavedEntities)
|
||||
foreach (IDataType entity in notification.SavedEntities)
|
||||
{
|
||||
_distributedCache.RefreshDataTypeCache(entity);
|
||||
}
|
||||
}
|
||||
|
||||
public void Handle(DataTypeDeletedNotification notification)
|
||||
{
|
||||
foreach (var entity in notification.DeletedEntities)
|
||||
foreach (IDataType entity in notification.DeletedEntities)
|
||||
{
|
||||
_distributedCache.RemoveDataTypeCache(entity);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -78,7 +78,11 @@ namespace Umbraco.Cms.Core.Compose
|
||||
.AddNotificationHandler<UserSavedNotification, DistributedCacheBinder>()
|
||||
.AddNotificationHandler<UserDeletedNotification, DistributedCacheBinder>()
|
||||
.AddNotificationHandler<UserGroupWithUsersSavedNotification, DistributedCacheBinder>()
|
||||
.AddNotificationHandler<UserGroupDeletedNotification, DistributedCacheBinder>();
|
||||
.AddNotificationHandler<UserGroupDeletedNotification, DistributedCacheBinder>()
|
||||
.AddNotificationHandler<MemberGroupDeletedNotification, DistributedCacheBinder>()
|
||||
.AddNotificationHandler<MemberGroupSavedNotification, DistributedCacheBinder>()
|
||||
.AddNotificationHandler<DataTypeDeletedNotification, DistributedCacheBinder>()
|
||||
.AddNotificationHandler<DataTypeSavedNotification, DistributedCacheBinder>();
|
||||
|
||||
// add notification handlers for auditing
|
||||
builder
|
||||
|
||||
Reference in New Issue
Block a user