public async Task <IActionResult> GetValueB() { var value = await RedisHelperA.GetCSRedisInstance().GetAsync("b"); Console.WriteLine(value); return(Json(new { value })); }
public RedisTestController() { if (!IsExists) { var path = AppDomain.CurrentDomain.BaseDirectory + "key.txt"; var key = System.IO.File.ReadAllText(path); RedisHelperA.GetCSRedisInstance().Set("b", key); RedisHelperA.GetCSRedisInstance().Set(key, "123"); RedisHelperA.GetCSRedisInstance().Set("a", "a"); IsExists = true; } }