From 7a52c95434d76c81186649bee8eac3018777aa33 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 10 Nov 2023 14:59:04 +0800 Subject: [PATCH] Set `CacheAbsoluteExpiration ` to 60 seconds. --- .../RemoteDynamicClaimsPrincipalContributorCacheOptions.cs | 2 +- .../Volo/Abp/Identity/UserUpdatedEventHandler.cs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCacheOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCacheOptions.cs index c8e31b1269..ea7afb5dcb 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCacheOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client.Common/Volo/Abp/AspNetCore/Mvc/Client/RemoteDynamicClaimsPrincipalContributorCacheOptions.cs @@ -8,6 +8,6 @@ public class RemoteDynamicClaimsPrincipalContributorCacheOptions public RemoteDynamicClaimsPrincipalContributorCacheOptions() { - CacheAbsoluteExpiration = TimeSpan.FromSeconds(5); + CacheAbsoluteExpiration = TimeSpan.FromSeconds(60); } } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserUpdatedEventHandler.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserUpdatedEventHandler.cs index d4a84c341a..9ac8ad4746 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserUpdatedEventHandler.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/UserUpdatedEventHandler.cs @@ -14,14 +14,11 @@ public class UserEntityUpdatedEventHandler : ILocalEventHandler>, ITransientDependency { - public ILogger Logger { get; set; } - private readonly IdentityDynamicClaimsPrincipalContributorCache _cache; public UserEntityUpdatedEventHandler(IdentityDynamicClaimsPrincipalContributorCache cache) { _cache = cache; - Logger = NullLogger.Instance; } [UnitOfWork] @@ -38,7 +35,6 @@ public class UserEntityUpdatedEventHandler : protected virtual async Task ClearAsync(Guid userId, Guid? tenantId) { - Logger.LogDebug($"Clearing dynamic claims cache for user: {userId}"); await _cache.ClearAsync(userId, tenantId); } }