Skip to content

Commit f5a9126

Browse files
committed
Merge branch 'rel-9.1' of https://github.com/abpframework/abp into rel-9.1
2 parents 08c2d7e + 8c79c50 commit f5a9126

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDynamicClaimsPrincipalContributorCache.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public virtual async Task<AbpDynamicClaimCacheItem> GetAsync(Guid userId, Guid?
5858
return emptyCacheItem;
5959
}
6060

61-
return await DynamicClaimCache.GetOrAddAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, tenantId), async () =>
61+
using (CurrentTenant.Change(tenantId))
6262
{
63-
using (CurrentTenant.Change(tenantId))
63+
return await DynamicClaimCache.GetOrAddAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, tenantId), async () =>
6464
{
6565
Logger.LogDebug($"Filling dynamic claims cache for user: {userId}");
6666

@@ -82,11 +82,11 @@ public virtual async Task<AbpDynamicClaimCacheItem> GetAsync(Guid userId, Guid?
8282
}
8383

8484
return dynamicClaims;
85-
}
86-
}, () => new DistributedCacheEntryOptions
87-
{
88-
AbsoluteExpirationRelativeToNow = CacheOptions.Value.CacheAbsoluteExpiration
89-
});
85+
}, () => new DistributedCacheEntryOptions
86+
{
87+
AbsoluteExpirationRelativeToNow = CacheOptions.Value.CacheAbsoluteExpiration
88+
});
89+
}
9090
}
9191

9292
public virtual async Task ClearAsync(Guid userId, Guid? tenantId = null)

0 commit comments

Comments
 (0)