1.服务跟客户端初始化的时候需要添加缓存配置
1
var host = new ServiceHostBuilder()
2
.RegisterServices(builder =>
3
{
4
builder.AddMicroService(option =>
5
{
6 option .AddCache()//缓存初始化
28 });
29
}).Configure(build =>
47
build.AddCacheFile("cacheSettings.json", optional: false,reloadOnChange:true))
48
.UseStartup<Startup>()
52
.Build();