public ActionResult TestRedisCache() { redisCacheProvider.Add <string>("vcredit:rc:dotnet.key1", "hello world"); redisCacheProvider.Add <string>("vcredit:rc:dotnet.date.now", DateTime.Now.ToLongDateString()); Dictionary <string, object> cacheContext = new Dictionary <string, object>(); string[] keys = new string[] { "vcredit:rc:dotnet.key1", "vcredit:rc:dotnet.date.now" }; foreach (string key in keys) { cacheContext.Add(key, redisCacheProvider.Select <string>(key)); } return(new JsonResult(cacheContext)); }