Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StackExchange Redis ConnectionString

What is the full format of the ConnectionString used in StackExchange.Redis?

I have searched but cannot find documentation for it.

like image 342
GaTechThomas Avatar asked Mar 03 '15 16:03

GaTechThomas


People also ask

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.

What is Redis connection timeout?

The maximum length of time to wait while establishing a connection to a Redis server.

What is Redis connection string?

Redis Connection strings have been expanded to support the more versatile URI format which is now able to capture most of Redis Client settings in a single connection string (akin to DB Connection strings).

What is Redis ConnectionMultiplexer?

Redis is the ConnectionMultiplexer class in the StackExchange. Redis namespace; this is the object that hides away the details of multiple servers. Because the ConnectionMultiplexer does a lot, it is designed to be shared and reused between callers. You should not create a ConnectionMultiplexer per operation.


2 Answers

If in doubt, use the ConfigurationOptions class (which has properties etc) and ToString() it when you are ready to obtain the configuration-string. However, I suspect you are looking for this

like image 99
Marc Gravell Avatar answered Sep 28 '22 03:09

Marc Gravell


Update. The 'correct' answer links to crazy documentation.

There doesn't seem to be a connect string...

var client = redis.createClient(9000); // Open a port on localhost
var client = redis.createClient('/tmp/redis.sock'); // Open a unix socket
var client = redis.createClient(9000, 'example.com'); 

This, and options are documented on the README.

like image 20
Michael Cole Avatar answered Sep 28 '22 03:09

Michael Cole