摘要: Redis是一个性能非常强劲的内存数据库,它一般是作为缓存来使用,但是他不仅仅可以用来作为缓存,比如著名的分布式框架dubbo就可以用Redis来做服务注册中心。接下来介绍一下.net core 使用Redis的发布/订阅功能。 Redis 发布订阅 Redis 发布订阅(pub/sub)是一种消息 阅读全文
posted @ 2021-08-30 17:24 China Soft 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 1.启动文件Startup 引入命名空间using Microsoft.AspNetCore.ResponseCompression; 2.ConfigureServices 方法增加以下代码 //注册压缩响应 services.AddResponseCompression(options => { 阅读全文
posted @ 2021-08-30 16:49 China Soft 阅读(295) 评论(0) 推荐(0) 编辑
摘要: static object locker1 = new object(); static object locker2 = new object(); static void Main(string[] args) { var taskList = new Task[2]; taskList[0] 阅读全文
posted @ 2021-08-30 16:17 China Soft 阅读(54) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { var count = 0; var taskList = new Task[10]; Stopwatch sp = new Stopwatch(); sp.Start(); // 不要意外复制。每个 阅读全文
posted @ 2021-08-30 15:30 China Soft 阅读(114) 评论(0) 推荐(0) 编辑
摘要: https://www.ear0.com/search/word-%E9%BC%93 阅读全文
posted @ 2021-08-30 10:12 China Soft 阅读(15) 评论(0) 推荐(0) 编辑