From 590ae4d30069adf9432d72b132b15e66c068629a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 9 Jan 2021 18:57:44 +0300 Subject: [PATCH] Invalidate current user client cache on feature changes. --- .../FeatureManagement/FeatureManagementModal.cshtml.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs index 367268019c..3572e65d3b 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs @@ -3,7 +3,9 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; +using Volo.Abp.EventBus.Local; using Volo.Abp.Features; using Volo.Abp.Validation.StringValues; @@ -27,6 +29,8 @@ namespace Volo.Abp.FeatureManagement.Web.Pages.FeatureManagement protected IFeatureAppService FeatureAppService { get; } + protected ILocalEventBus LocalEventBus { get; } + public FeatureManagementModal(IFeatureAppService featureAppService) { ObjectMapperContext = typeof(AbpFeatureManagementWebModule); @@ -56,6 +60,10 @@ namespace Volo.Abp.FeatureManagement.Web.Pages.FeatureManagement await FeatureAppService.UpdateAsync(ProviderName, ProviderKey, features); + await LocalEventBus.PublishAsync( + new CurrentApplicationConfigurationCacheResetEventData() + ); + return NoContent(); }