예제 #1
0
 public void Dispose()
 {
     if (conn != null)
     {
         conn.Close();
         instance = null;
     }
 }
예제 #2
0
 public static void InitRedis(string connStr, int db, string name)
 {
     StackRedisHelper.connStr = connStr;
     StackRedisHelper.db      = db;
     StackRedisHelper.name    = name;
     instance = new StackRedisHelper();
     conn     = ConnectionMultiplexer.Connect(StackRedisHelper.connStr);
 }