1. NET CORE 分布式缓存IDistributedCache
Microsoft.Extensions.Caching.Distributed.MemoryDistributedCache
Microsoft.Extensions.Caching.Redis.RedisCache
Microsoft.Extensions.Caching.SqlServer.SqlServerCache
Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache
都继承了IDistributedCache,所以它们公用一套set ,get... 方法,可灵活按需切换
使用MemoryDistributedCache时则
services.AddDistributedMemoryCache();
使用StackExchangeRedis时则
services.RemoveAll(typeof(IDistributedCache));//移除其他所有IDistributedCache相关服务
services.AddStackExchangeRedisCache(opts =>
{
opts.Configuration = config;
opts.InstanceName = name;
});
2.asp.net core 5配置IIS报错 HTTP 错误 500.19 - Internal Server Error
- 检查你的IIS》"模块"》里是否 存在【AspNetCoreModuleV2】这个东西
- 下载安装 dotnet-hosting-5.0.6-win.exe
- 重启IIS
3.vue装包报错:run 'npm audit fix' or 'npm audit' for detail
- 删除 node_modules 原包 和 删除package-lock.json。
- 执行清除缓存命令:npm cache clean --force
- 全部重装包 npm install
4.VUE发布到IIS过程与注意事项
- 先安装好IIS
- 安装2个IIS相关的模块:
重写模块,下载地址:URL Rewrite : The Official Microsoft IIS Site
代理模块,下载地址:App