StackExchange.Redis 配置选项
示例
连接到Redis服务器并允许管理(风险)命令
ConfigurationOptions options = new ConfigurationOptions()
{
EndPoints = { { "localhost", 6379}},
AllowAdmin = true,
ConnectTimeout = 60*1000,
};
ConnectionMultiplexer multiplexer = ConnectionMultiplexer.Connect(options);要么
ConnectionMultiplexer multiplexer =
ConnectionMultiplexer.Connect("localhost:6379,allowAdmin=True,connectTimeout=60000");通过SSL连接到Redis服务器
ConfigurationOptions options = new ConfigurationOptions()
{
EndPoints = { { "localhost", 6380}},
Ssl = true,
Password = "12345"
};
ConnectionMultiplexer multiplexer = ConnectionMultiplexer.Connect(options);要么
ConnectionMultiplexer multiplexer =
ConnectionMultiplexer.Connect("localhost:6380,ssl=True,password=12345");
热门推荐
10 春节新年祝福语简短幽默
11 闺蜜小孩祝福语简短
12 工资涨高祝福语简短
13 迎元旦平安祝福语简短
14 企业祝福语简短句子
15 集体生日祝福语简短的
16 微信立冬祝福语简短
17 商务感恩祝福语大全简短
18 孩子新年祝福语简短精辟