StackExchange.Redis icon indicating copy to clipboard operation
StackExchange.Redis copied to clipboard

How to flush redis cache across all databases?

Open axerosolutions opened this issue 12 years ago • 2 comments

Hi,

I was not able to locate the method to flush the cache across all databases (FLUSHALL)?

Can someone help?

Thanks.

axerosolutions avatar Jun 02 '14 19:06 axerosolutions

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();

RomanTomsk avatar Jun 10 '14 04:06 RomanTomsk

See also: https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/KeysScan.md (which is linked from the homepage)

mgravell avatar Jun 10 '14 06:06 mgravell