diff --git a/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DistributedCacheClientFactoryBase.cs b/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DefaultDistributedCacheClientFactory.cs similarity index 77% rename from src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DistributedCacheClientFactoryBase.cs rename to src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DefaultDistributedCacheClientFactory.cs index cb047348b..ce39cdf34 100644 --- a/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DistributedCacheClientFactoryBase.cs +++ b/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DefaultDistributedCacheClientFactory.cs @@ -3,7 +3,7 @@ namespace Masa.BuildingBlocks.Caching; -public class DistributedCacheClientFactoryBase : CacheClientFactoryBase, IDistributedCacheClientFactory +public class DefaultDistributedCacheClientFactory : CacheClientFactoryBase, IDistributedCacheClientFactory { protected override string DefaultServiceNotFoundMessage => "Default DistributedCache not found, you need to add it, like services.AddStackExchangeRedisCache()"; @@ -14,7 +14,7 @@ protected override string DefaultServiceNotFoundMessage private readonly IOptionsMonitor _optionsMonitor; - public DistributedCacheClientFactoryBase(IServiceProvider serviceProvider) : base(serviceProvider) + public DefaultDistributedCacheClientFactory(IServiceProvider serviceProvider) : base(serviceProvider) { _optionsMonitor = serviceProvider.GetRequiredService>(); } diff --git a/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/MultilevelCacheClientFactoryBase.cs b/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DefaultMultilevelCacheClientFactory.cs similarity index 77% rename from src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/MultilevelCacheClientFactoryBase.cs rename to src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DefaultMultilevelCacheClientFactory.cs index 081780c22..1966ceead 100644 --- a/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/MultilevelCacheClientFactoryBase.cs +++ b/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Default/DefaultMultilevelCacheClientFactory.cs @@ -3,7 +3,7 @@ namespace Masa.BuildingBlocks.Caching; -public class MultilevelCacheClientFactoryBase : CacheClientFactoryBase, IMultilevelCacheClientFactory +public class DefaultMultilevelCacheClientFactory : CacheClientFactoryBase, IMultilevelCacheClientFactory { protected override string DefaultServiceNotFoundMessage => "Default MultilevelCache not found, you need to add it, like services.AddMultilevelCache()"; @@ -14,7 +14,7 @@ protected override string DefaultServiceNotFoundMessage private readonly IOptionsMonitor _optionsMonitor; - public MultilevelCacheClientFactoryBase(IServiceProvider serviceProvider) : base(serviceProvider) + public DefaultMultilevelCacheClientFactory(IServiceProvider serviceProvider) : base(serviceProvider) { _optionsMonitor = serviceProvider.GetRequiredService>(); } diff --git a/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Extensions/ServiceCollectionExtensions.Core.cs b/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Extensions/ServiceCollectionExtensions.Core.cs index 7f0f04ea8..7c83c00a0 100644 --- a/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Extensions/ServiceCollectionExtensions.Core.cs +++ b/src/BuildingBlocks/Caching/Masa.BuildingBlocks.Caching/Extensions/ServiceCollectionExtensions.Core.cs @@ -13,7 +13,7 @@ public static IServiceCollection TryAddDistributedCacheCore(IServiceCollection s MasaApp.TrySetServiceCollection(services); services.AddServiceFactory(); - services.TryAddSingleton(); + services.TryAddSingleton(); services.TryAddSingleton(serviceProvider => serviceProvider.GetRequiredService().Create()); services.TryAddSingleton(typeof(IDistributedCacheClient), serviceProvider @@ -26,7 +26,7 @@ public static IServiceCollection TryAddDistributedCacheCore(IServiceCollection s public static IServiceCollection TryAddMultilevelCacheCore(IServiceCollection services, string name) { - services.TryAddSingleton(); + services.TryAddSingleton(); services.TryAddSingleton(serviceProvider => serviceProvider.GetRequiredService().Create()); services.TryAddSingleton(typeof(IMultilevelCacheClient), serviceProvider