How can I store a list using StackExchange.Redis?
asp.net-mvc, c#, stackexchange.redis
Solution
I recommend you to use StackExchange.Redis.Extensions, then you can do this:
var list = new List<int> { 1, 2, 3 };
bool added = cacheClient.Add("MyList", list, DateTimeOffset.Now.AddMinutes(10));
And to retrieve your list:
var list = cacheClient.Get<List<int>>("MyList");
Problem
I am using `StackExchange.Redis` (Version 1.2.1) with an ASP.NET MVC C# application. I am able to store and view arrays and strings using `StackExchange.Redis`. However, I am not able to figure out a way to store a list. Is there any way to do it? If not can you please suggest some good alternatives to `StackExchange.Redis` to accomplish this requirement?