From ec377130527dc6536b0333b95ea50229a334bed3 Mon Sep 17 00:00:00 2001 From: "nick.yi" Date: Thu, 2 Apr 2026 15:27:26 +0800 Subject: [PATCH] Optimize RedisCache IOC --- src/Infrastructure/BotSharp.Core/BotSharpCoreExtensions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Infrastructure/BotSharp.Core/BotSharpCoreExtensions.cs b/src/Infrastructure/BotSharp.Core/BotSharpCoreExtensions.cs index 9c34de599..35bdd5575 100644 --- a/src/Infrastructure/BotSharp.Core/BotSharpCoreExtensions.cs +++ b/src/Infrastructure/BotSharp.Core/BotSharpCoreExtensions.cs @@ -49,6 +49,7 @@ private static void AddCacheServices(IServiceCollection services, IConfiguration config.Bind("SharpCache", cacheSettings); services.AddSingleton(x => cacheSettings); + services.AddSingleton(); services.AddSingleton(sp => cacheSettings.CacheType switch { CacheType.RedisCache => ActivatorUtilities.CreateInstance(sp),