Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinyouzeng committed Sep 21, 2024
1 parent 04342e2 commit 965a86c
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ public static void TryAddDistributedCache(
services.TryAddTransient<IDistributedCacheClientFactory, DefaultDistributedCacheClientFactory>();
services.TryAddTransient<IManualDistributedCacheClient>(serviceProvider =>
{
var cacheClient = serviceProvider.EnableIsolation() ?
serviceProvider.GetRequiredService<ScopedService<IManualDistributedCacheClient>>().Service :
serviceProvider.GetRequiredService<SingletonService<IManualDistributedCacheClient>>().Service;
var cacheClient = serviceProvider.GetRequiredService<ScopedService<IManualDistributedCacheClient>>().Service;
return new DefaultDistributedCacheClient(cacheClient);
});
services.TryAddTransient<IDistributedCacheClient>(serviceProvider
Expand Down

0 comments on commit 965a86c

Please sign in to comment.