Closed hunter007 closed 8 years ago
This fixes an issue I'm encountering. Why did this PR get closed?
I'm integrating flask-session
with an existing app that uses a StrictRedis
instance. Like @twolfson mentions, this pkg doesn't work without swapping the arguments (like in this PR). I'm happy to submit a PR that checks the type of the redis instance if it would get merged.
To provide more context for future persons interested in using this module.
redis-py
initially set up the ordering for theirsetex
incorrectly. Eventually they fixed it by declaring something known asStrictRedis
.https://github.com/andymccurdy/redis-py/tree/2.10.3#api-reference
Currently, this repo is initializing a
Redis
instance by default rather than aStrictRedis
instance. In my opinion, it's probably best to support both cases -- maybe via astrict=True
parameter or sniffing the instances forisinstance(StrictRedis)
.