Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enhances the application configuration cache invalidation mechanism to support clearing cache for all users, not just the current user. It introduces an optional UserId parameter throughout the cache reset infrastructure: when null, it clears cache for all users by removing a version cache key; when provided, it clears cache for a specific user.
Key changes:
- Added
UserIdproperty toCurrentApplicationConfigurationCacheResetEventDatato support user-specific or global cache invalidation - Implemented version-based cache key generation using
MvcCachedApplicationVersionCacheItemto enable clearing cache for all users - Updated permission management modals to pass user ID when resetting cache after user permission changes
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
CurrentApplicationConfigurationCacheResetEventData.cs |
Added optional UserId property and constructor to support both user-specific and global cache reset |
MvcCurrentApplicationConfigurationCacheResetEventHandler.cs |
Updated to handle both user-specific cache removal and global cache invalidation via version cache |
MvcCachedApplicationVersionCacheItem.cs |
New cache item to track application version for global cache invalidation |
MvcCachedApplicationConfigurationClientHelper.cs |
Refactored from static to instance class with version-based cache key generation |
MvcCachedApplicationConfigurationClient.cs |
Updated to use helper instance and async cache key creation |
RemoteDynamicClaimsPrincipalContributorCache.cs |
Updated to use cache helper instance instead of static method |
ICurrentApplicationConfigurationCacheResetService.cs |
Added optional userId parameter to ResetAsync method signature |
BlazorServerCurrentApplicationConfigurationCacheResetService.cs |
Updated to pass userId to event data |
BlazorWebAssemblyCurrentApplicationConfigurationCacheResetService.cs |
Added userId parameter (though implementation doesn't use it) |
NullCurrentApplicationConfigurationCacheResetService.cs |
Added userId parameter to maintain interface consistency |
MauiCurrentApplicationConfigurationCacheResetService.cs |
Added userId parameter (though implementation doesn't use it) |
PermissionManagementModal.cshtml.cs |
Updated to extract and pass user ID when provider is UserPermissionValueProvider |
PermissionManagementModal.razor.cs |
Updated to extract and pass user ID when provider is UserPermissionValueProvider |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...pNetCore/Mvc/ApplicationConfigurations/CurrentApplicationConfigurationCacheResetEventData.cs
Show resolved
Hide resolved
...ore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationVersionCacheItem.cs
Show resolved
Hide resolved
...bAssembly/Configuration/BlazorWebAssemblyCurrentApplicationConfigurationCacheResetService.cs
Show resolved
Hide resolved
...Abp/AspNetCore/Components/MauiBlazor/MauiCurrentApplicationConfigurationCacheResetService.cs
Show resolved
Hide resolved
hikalkan
approved these changes
Dec 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://abp.io/support/questions/10259
When an admin changes settings, features, or permissions, we need to clear the
ApplicationConfigurationDtocache for all users in MVC.If we can identify the target user(eg: change user permissions), we only need to clear their cache.