Question

How can we excecute FlushAll and FlushDB redis commands using stackexchange redis client?

Was it helpful?

Solution

The project homepage has a Documentation section, which includes Where are KEYS, SCAN, FLUSHDB etc?

The short answer is: via IServer. The documentation includes the "why".

// get the target server
var server = conn.GetServer(someServer);

// completely wipe ALL keys from database 0
server.FlushDatabase(); // database number is optional and defaults to 0
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top