StackExchange.Redis
StackExchange.Redis copied to clipboard
How to flush redis cache across all databases?
Hi,
I was not able to locate the method to flush the cache across all databases (FLUSHALL)?
Can someone help?
Thanks.
Just call FlushAllDatabases method from Master server
var _connection = ConnectionMultiplexer.Connect("allowAdmin=1 , 192.168.113.130"); var server = _connection.GetServer("192.168.113.130:6379"); server.Server.FlushAllDatabases();
See also: https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/KeysScan.md (which is linked from the homepage)