分布式缓存组件准备
							parent
							
								
									173f899881
								
							
						
					
					
						commit
						86a486b060
					
				| 
						 | 
				
			
			@ -70,7 +70,8 @@
 | 
			
		|||
    <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
 | 
			
		||||
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
 | 
			
		||||
    <PackageReference Include="EasyCaching.InMemory" Version="1.7.0" />
 | 
			
		||||
    <PackageReference Include="EasyCaching.Interceptor.Castle" Version="1.7.0" />
 | 
			
		||||
	<PackageReference Include="EasyCaching.Interceptor.Castle" Version="1.9.1" />
 | 
			
		||||
	<PackageReference Include="EasyCaching.Serialization.MessagePack" Version="1.9.1" />
 | 
			
		||||
    <PackageReference Include="EntityFrameworkCore.Triggered.Extensions" Version="3.2.1" />
 | 
			
		||||
    <PackageReference Include="Google.Protobuf" Version="3.21.8" />
 | 
			
		||||
    <PackageReference Include="Grpc.Net.Client" Version="2.49.0" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -109,7 +109,7 @@ namespace IRaCIS.Core.API
 | 
			
		|||
            // MediatR 进程内消息 事件解耦  从程序集中 注册命令和handler对应关系
 | 
			
		||||
            services.AddMediatR(typeof(ConsistencyVerificationHandler).Assembly);
 | 
			
		||||
            // EasyCaching 缓存
 | 
			
		||||
            services.AddEasyCachingSetup();
 | 
			
		||||
            services.AddEasyCachingSetup(_configuration);
 | 
			
		||||
 | 
			
		||||
            //services.AddDistributedMemoryCache();
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,17 +1,26 @@
 | 
			
		|||
using EasyCaching.Core;
 | 
			
		||||
using EasyCaching.Core.Configurations;
 | 
			
		||||
using EasyCaching.Interceptor.Castle;
 | 
			
		||||
using Microsoft.Extensions.Configuration;
 | 
			
		||||
using Microsoft.Extensions.DependencyInjection;
 | 
			
		||||
 | 
			
		||||
namespace IRaCIS.Core.API
 | 
			
		||||
{
 | 
			
		||||
    public  static class EasyCachingSetup
 | 
			
		||||
    public static class EasyCachingSetup
 | 
			
		||||
    {
 | 
			
		||||
        public static void AddEasyCachingSetup(this IServiceCollection services)
 | 
			
		||||
        public static void AddEasyCachingSetup(this IServiceCollection services, IConfiguration configuration)
 | 
			
		||||
        {
 | 
			
		||||
            services.AddEasyCaching(options =>
 | 
			
		||||
            {
 | 
			
		||||
                options.UseInMemory();
 | 
			
		||||
 | 
			
		||||
                //options.UseRedis(configuration, EasyCachingConstValue.DefaultRedisName).WithMessagePack(EasyCachingConstValue.DefaultRedisName); 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            //services.ConfigureCastleInterceptor(options => options.CacheProviderName = EasyCachingConstValue.DefaultRedisName);
 | 
			
		||||
 | 
			
		||||
            services.ConfigureCastleInterceptor(options => options.CacheProviderName = EasyCachingConstValue.DefaultInMemoryName);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -55,6 +55,26 @@
 | 
			
		|||
        "EnableReadDeepClone": true,
 | 
			
		||||
        "EnableWriteDeepClone": false
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "redis": {
 | 
			
		||||
      "MaxRdSecond": 120,
 | 
			
		||||
      "EnableLogging": false,
 | 
			
		||||
      "LockMs": 5000,
 | 
			
		||||
      "SleepMs": 300,
 | 
			
		||||
      "dbconfig": {
 | 
			
		||||
        "Password": "xc@123456",
 | 
			
		||||
        "IsSsl": false,
 | 
			
		||||
        "SslHost": null,
 | 
			
		||||
        "ConnectionTimeout": 5000,
 | 
			
		||||
        "AllowAdmin": true,
 | 
			
		||||
        "Endpoints": [
 | 
			
		||||
          {
 | 
			
		||||
            "Host": "47.117.164.182",
 | 
			
		||||
            "Port": 6379
 | 
			
		||||
          }
 | 
			
		||||
        ],
 | 
			
		||||
        "Database": 0
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "IRaCISImageStore": {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,8 @@
 | 
			
		|||
		<PackageReference Include="AutoMapper.Collection.EntityFrameworkCore" Version="9.0.0" />
 | 
			
		||||
		<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
 | 
			
		||||
		<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
 | 
			
		||||
		<PackageReference Include="EasyCaching.Interceptor.AspectCore" Version="1.7.0" />
 | 
			
		||||
		<PackageReference Include="EasyCaching.Redis" Version="1.9.1" />
 | 
			
		||||
		<PackageReference Include="EasyCaching.InMemory" Version="1.9.1" />
 | 
			
		||||
		<PackageReference Include="ExcelDataReader" Version="3.6.0" />
 | 
			
		||||
		<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
 | 
			
		||||
		<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
 | 
			
		||||
| 
						 | 
				
			
			@ -91,7 +92,6 @@
 | 
			
		|||
		<PackageReference Include="Magicodes.IE.Excel.AspNetCore" Version="2.7.4.2" />
 | 
			
		||||
		<PackageReference Include="MailKit" Version="3.4.2" />
 | 
			
		||||
		<PackageReference Include="MediatR" Version="11.0.0" />
 | 
			
		||||
		<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="6.0.10" />
 | 
			
		||||
		<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10">
 | 
			
		||||
		  <TreatAsUsed>true</TreatAsUsed>
 | 
			
		||||
		</PackageReference>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10274,11 +10274,6 @@
 | 
			
		|||
        <member name="T:IRaCIS.Core.Application.Contracts.TrialSiteUserSurveyAddOrEdit">
 | 
			
		||||
            <summary> TrialSiteUserSurveyAddOrEdit  列表查询参数模型</summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="T:IRaCIS.Core.Application.Contracts.JsonPatchUserRequestExample">
 | 
			
		||||
            <summary>
 | 
			
		||||
            实测 标注在服务方法上 没用
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="T:IRaCIS.Core.Application.Contracts.TrialSiteEquipmentSurveyService">
 | 
			
		||||
            <summary>
 | 
			
		||||
            TrialSiteEquipmentSurveyService
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,51 +0,0 @@
 | 
			
		|||
using Microsoft.AspNetCore.JsonPatch.Operations;
 | 
			
		||||
using Swashbuckle.AspNetCore.Filters;
 | 
			
		||||
 | 
			
		||||
namespace IRaCIS.Core.Application.Contracts
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 实测 标注在服务方法上 没用
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class JsonPatchUserRequestExample : IExamplesProvider<object>
 | 
			
		||||
    {
 | 
			
		||||
        public Operation[] GetExamples()
 | 
			
		||||
        {
 | 
			
		||||
            return new[]
 | 
			
		||||
           {
 | 
			
		||||
                new Operation
 | 
			
		||||
                {
 | 
			
		||||
                    op = "replace",
 | 
			
		||||
                    path = "/name",
 | 
			
		||||
                        value = "Gordon"
 | 
			
		||||
                },
 | 
			
		||||
                new Operation
 | 
			
		||||
                {
 | 
			
		||||
                    op = "replace",
 | 
			
		||||
                    path = "/surname",
 | 
			
		||||
                        value = "Freeman"
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        object IExamplesProvider<object>.GetExamples()
 | 
			
		||||
        {
 | 
			
		||||
            return new[]
 | 
			
		||||
          {
 | 
			
		||||
                new Operation
 | 
			
		||||
                {
 | 
			
		||||
                    op = "replace",
 | 
			
		||||
                    path = "/name",
 | 
			
		||||
                        value = "Gordon"
 | 
			
		||||
                },
 | 
			
		||||
                new Operation
 | 
			
		||||
                {
 | 
			
		||||
                    op = "replace",
 | 
			
		||||
                    path = "/surname",
 | 
			
		||||
                        value = "Freeman"
 | 
			
		||||
                }
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue