Skip to content

Conversation

@maliming
Copy link
Member

@maliming maliming commented Dec 26, 2025

https://abp.io/support/questions/10259

When an admin changes settings, features, or permissions, we need to clear the ApplicationConfigurationDto cache for all users in MVC.

If we can identify the target user(eg: change user permissions), we only need to clear their cache.

@maliming maliming marked this pull request as ready for review December 26, 2025 09:26
Copilot AI review requested due to automatic review settings December 26, 2025 09:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 UserId property to CurrentApplicationConfigurationCacheResetEventData to support user-specific or global cache invalidation
  • Implemented version-based cache key generation using MvcCachedApplicationVersionCacheItem to 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.

@maliming maliming added this to the 10.0-patch milestone Dec 26, 2025
@maliming maliming requested a review from hikalkan December 29, 2025 00:59
@hikalkan hikalkan merged commit 679e840 into rel-10.0 Dec 29, 2025
3 checks passed
@hikalkan hikalkan deleted the ICurrentApplicationConfigurationCacheResetService branch December 29, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants