新增加redis方法
This commit is contained in:
17
ZR.Common/Cache/RedisServer.cs
Normal file
17
ZR.Common/Cache/RedisServer.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using CSRedis;
|
||||
using Infrastructure;
|
||||
|
||||
namespace ZR.Common.Cache
|
||||
{
|
||||
public class RedisServer
|
||||
{
|
||||
public static CSRedisClient Cache;
|
||||
public static CSRedisClient Session;
|
||||
|
||||
public static void Initalize()
|
||||
{
|
||||
Cache = new CSRedisClient(ConfigUtils.Instance.GetConfig("RedisServer:Cache"));
|
||||
Session = new CSRedisClient(ConfigUtils.Instance.GetConfig("RedisServer:Session"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user