> There doesn't seem to be a `Flush(...)` method? How can I remove all the keys in the database?
> There doesn't seem to be a `Flush(...)` method? How can I remove all the keys in the database?
The key word here, oddly enough, is the last one: database. Because StackExchange.Redis aims to target scenarios such as cluster, it is important to know which commands target the *database* (the logical database that could be distributed over multiple nodes), and which commands target the *server*. These commands:
The key word here, oddly enough, is the last one: database. Because StackExchange.Redis aims to target scenarios such as cluster, it is important to know which commands target the *database* (the logical database that could be distributed over multiple nodes), and which commands target the *server*. The folliowing commands all target a single server:
-`KEYS` / `SCAN`
-`KEYS` / `SCAN`
-`FLUSHDB` / `FLUSHALL`
-`FLUSHDB` / `FLUSHALL`
-`RANDOMKEY`
-`RANDOMKEY`
-`CLIENT`
-`CLIENT`
-`CLUSTER`
-`CLUSTER`
-`CONFIG *` / `INFO` / `TIME`
-`CONFIG` / `INFO` / `TIME`
-`SLAVEOF`
-`SLAVEOF`
-`SAVE` / `BGSAVE` / `LASTSAVE`
-`SAVE` / `BGSAVE` / `LASTSAVE`
-`SCRIPT` (not to be confused with `EVAL` / `EVALSHA`)
-`SCRIPT` (not to be confused with `EVAL` / `EVALSHA`)