Last post Jun 24, 2018 10:28 AM by itsathere
Member
3 Points
55 Posts
Jun 23, 2018 07:59 AM|itsathere|LINK
Jun 24, 2018 10:28 AM|itsathere|LINK
ConfigurationOptions options = ConfigurationOptions.Parse(RedisCacheConnectionstring); ConnectionMultiplexer connection = ConnectionMultiplexer.Connect(options); IDatabase db = connection.GetDatabase(); EndPoint endPoint = connection.GetEndPoints().First(); RedisKey[] keys = connection.GetServer(endPoint).Keys(pattern: "*").ToArray(); var server = connection.GetServer(endPoint); foreach (var key in server.Keys()) { // Use Keys as per requirement }
Member
3 Points
55 Posts
How to get all keys/data from redis cache
Jun 23, 2018 07:59 AM|itsathere|LINK
If anybody have any idea about the topic, kindly share it.
Thanks
Member
3 Points
55 Posts
Re: How to get all keys/data from redis cache
Jun 24, 2018 10:28 AM|itsathere|LINK
ConfigurationOptions options = ConfigurationOptions.Parse(RedisCacheConnectionstring);
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect(options);
IDatabase db = connection.GetDatabase();
EndPoint endPoint = connection.GetEndPoints().First();
RedisKey[] keys = connection.GetServer(endPoint).Keys(pattern: "*").ToArray();
var server = connection.GetServer(endPoint);
foreach (var key in server.Keys())
{
// Use Keys as per requirement
}