Working on a console application, I have a singleton class which contains some generic collections. This collections were previously kept in memory and we are trying to move them to redis using stack exchange redis library.
Base class is:
public class QueueParamDTO
{
public string Queue { get; set; }
public int Max { get; set; }
public int Calls { get; set; }
public int Holdtime { get; set; }
public int TalkTime { get; set; }
public int Completed { get; set; }
public int Abandoned { get; set; }
...
}
The value of Property Queue of the class is unique so I'm using it to build the key and as for the value is a serialized string of the above object.
RedisSingleton.Connection.GetDatabase().StringSet($"queue:{queueParam.Queue}",JsonConvert.SerializeObject(queueParam));
I'm able to read individual values and deserializing the object. Also retrieve the complete list of keys using a pattern:
var keys = server.Keys(pattern: "queue:*", pageSize: 100);
How can I do the same thing for values, meaning getting the list of values using a specific key pattern as above ?