Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to flushdb using StackExchange.Redis?

Is there a way to delete all keys in redis using stackexchange.redis?

I am trying to flush my redis database in my unit test setup.

Thanks.

like image 797
Misterhex Avatar asked Apr 30 '14 07:04

Misterhex


People also ask

Is StackExchange redis thread safe?

redis is fully thread safe; the expected usage is that a single multiplexer is reused between concurrent requests etc - very parallel. Two concurrent callers do not block each other: the two requests are pipelined and the results made available to each when the come back.

How do I get all redis keys?

To list the keys in the Redis data store, use the KEYS command followed by a specific pattern. Redis will search the keys for all the keys matching the specified pattern. In our example, we can use an asterisk (*) to match all the keys in the data store to get all the keys.

What is StackExchange redis?

StackExchange. Redis is a high performance general purpose redis client for . NET languages (C#, etc.). It is the logical successor to BookSleeve, and is the client developed-by (and used-by) Stack Exchange for busy sites like Stack Overflow.


1 Answers

Basically, it is on IServer.

For reasons and more information, please see Where are KEYS, SCAN, FLUSHDB etc?, which is linked from the project home page, under "Documentation":

enter image description here

like image 69
Marc Gravell Avatar answered Sep 21 '22 13:09

Marc Gravell