I am trying to go through the list of dbX in Redis via StackExchange.Redis and look for the particular type of the keys. There are string, list, set, zset, hash types of keys. Lets say I would like to find the list types of keys in the db1, I tried the following:
RedisCacheClient _client;
...
IRedisDatabase database = _client.GetDb(1);
List<InfoDetail> categorizedInfo = await database.GetInfoCategorizedAsync();
IEnumerable<InfoDetail> infos = categorizedInfo.Where(i => i.Category == "Keyspace");
This helps me with getting the basic info about the keys keys=9,expires=0,avg_ttl=0 but not the types.
I can find all the keys:
IEnumerable<string> keys = await database.SearchKeysAsync("*");
But that gives me only the names, not the types of the keys.
So, how do I find the type of the key?.
Is this possible to do?
Thanks.