How to excecute flush commands on stackexchange redis client using c#
-
26-12-2019 - |
Question
How can we excecute FlushAll and FlushDB redis commands using stackexchange redis client?
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