Add support for custom StrictRedis instantiation

Issue #111 resolved
oahayder
created an issue

I have a Redis connection that requires SSL. Can we just inject our own StrictRedis instance into RedisBackend and/or expose the client attribute of RedisBackend via some setter?

Comments (5)

  1. Michael Bayer repo owner

    you can provide a redis.ConnectionPool that has all the connect arguments set up. or the URL as "rediss://" if that's all you need. for ssl_certfile, ssl_cert_reqs, ssl=True, these should be added as arguments to the backend. I'll accept a PR.

  2. oahayder reporter

    We also actually extend StrictRedis and add timing/monitoring to it's calls. Do you not like the idea of injecting an existing connection to increase simplicity?

    EDIT: Got it to work via connection pooling. Thanks for looking at this Michael!

  3. Log in to comment