Exemple #1
0
        public async Task <IActionResult> GetValueB()
        {
            var value = await RedisHelperA.GetCSRedisInstance().GetAsync("b");

            Console.WriteLine(value);
            return(Json(new { value }));
        }
Exemple #2
0
 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;
     }
 }