上一页 1 2 3 4 5 6 7 8 ··· 19 下一页
摘要: 1 /// <summary> 2 /// Redis操作 3 /// </summary> 4 public class RedisHelper 5 { 6 7 //static NewtonsoftSerializer serializer = new NewtonsoftSerializer( 阅读全文
posted @ 2020-05-05 14:22 安以痕_陈 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 一,引入dll 1.ServiceStack.Common.dll 2.ServiceStack.Interfaces.dll 3.ServiceStack.Redis.dll 4.ServiceStack.Text.dll 二,修改配置文件 在你的配置文件中加入如下的代码: <appSetting 阅读全文
posted @ 2020-05-05 13:51 安以痕_陈 阅读(356) 评论(0) 推荐(0) 编辑
摘要: Redis配置主从 主IP :端口 192.168.0.103 6666 从IP:端口 192.168.0.108 3333 提示:做主从配置的时候 可以用到 Sentinel 哨兵 功能可以实现 主redis挂了之后 自动切到另外一个 redis 配置从库 (1)安装服务: redis-serve 阅读全文
posted @ 2020-05-05 13:39 安以痕_陈 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 一.redis 设置密码 使用下载好的 redis-cli.exe 指令: 1.设置密码: config set requirepass 123456 2.查看:info(验证无法通过) 3.授权登陆 auth 123456 二.Redis 更改端口(如从 6379 改到 6820) 1.打开下图: 阅读全文
posted @ 2020-05-05 13:38 安以痕_陈 阅读(802) 评论(0) 推荐(0) 编辑
摘要: 一.认识Redis 1. Redis 是一个高性能的key-value数据库。 2. 它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hash(哈希类型)。 3.周期性的把更新的数据写入磁盘或者把修改操 阅读全文
posted @ 2020-05-05 13:30 安以痕_陈 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 为什么要有设计原则,我觉得一张图片就可以解释这一切 一、单一职责原则(SRP) 对于一个类而言,应该只有一个发生变化的原因。(单一职责不仅仅是指类) 如果一个模块需要修改,它肯定是有原因的,除此原因之外,如果遇到了其他情况,还需要对此模块做出修改的话,那么就说这个模块就兼具多个职责。举个栗子: 此时 阅读全文
posted @ 2020-05-04 22:48 安以痕_陈 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 委托的本质,是一个类,而事件,是一个委托类型的私有变量加上两个公有方法(事件的+=和-=),这是本质区别。打个比方,string 也是一个类,而string s = "a",这个s是string类型的一个变量(略有不恰当,为了方便直观理解)。public delegate void myDel(); 阅读全文
posted @ 2020-05-04 22:19 安以痕_陈 阅读(2229) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 阅读全文
posted @ 2020-05-04 22:11 安以痕_陈 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 阅读全文
posted @ 2020-05-04 20:51 安以痕_陈 阅读(116) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2020-05-04 15:20 安以痕_陈 阅读(68) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页