/// <summary> /// 初始化csredis静态访问类 /// RedisHelper.Initialization( /// csredis: new CSRedis.CSRedisClient(\"127.0.0.1:6379,pass=123,defaultDatabase=13,poolsize=50,ssl=false,writeBuffer=10240,prefix=key前辍\"), /// serialize: value => Newtonsoft.Json.JsonConvert.SerializeObject(value), /// deserialize: (data, type) => Newtonsoft.Json.JsonConvert.DeserializeObject(data, type)) /// </summary> /// <param name="csredis"></param> /// <param name="serialize"></param> /// <param name="deserialize"></param> public static void Initialization(CSRedisClient csredis, Func <object, string> serialize, Func <string, Type, object> deserialize) { _instance = csredis; _serialize = serialize; _deserialize = deserialize; }
public CSRedisCache(CSRedisClient redisClient) { _redisClient = redisClient; }