using StackExchange.Redis;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace Bro.Tool.Redis
|
{
|
public class BroRedis
|
{
|
public static void Test()
|
{
|
using (ConnectionMultiplexer conn = ConnectionMultiplexer.Connect("127.0.0.1:6379"))
|
{
|
IDatabase db = conn.GetDatabase();
|
//往Redis里面写入一个Key为name的字符串
|
|
double[,] data = new double[6,6];
|
|
for (int i = 0; i < 6; i++)
|
{
|
for (int j = 0; j < 6; j++)
|
{
|
data[i, j] = i * 6 + j;
|
}
|
}
|
|
//bool flag = db.StringSet("name", new double[6] );
|
//读取数据
|
//var a = db.StringGet("name");
|
}
|
}
|
|
public string DataToString(double[][] data)
|
{
|
string str = "";
|
|
|
return str;
|
|
}
|
}
|
}
|