vseloved / cl-redis

Redis client for Common Lisp
Other
188 stars 38 forks source link

Can i manage multiple redis connection? #21

Closed jeffma closed 10 years ago

jeffma commented 10 years ago

I want to keep connecting 2 or more redis server , how can I do that.

vseloved commented 10 years ago

Hi,

You just need to establish and manage the connections separately with either with-connection or connect/disconnect.

The second option will look like this:

(let ((conn1 (redis:connect ...))
      (conn2 (redis:connect ...)))
  ...
  (let ((redis:*connection* conn1))
     ...)
  (let ((redis:*connection* conn2))
     ...))
jeffma commented 10 years ago

thanks. it's very helpful.