New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RedisCache only accepts string keys #1152
Comments
So what's your proposal? I don't want to drop the prefix, but converting arbitrary objects to string might not be correct. |
Maybe add a check to see if the attempted key is a string and only then add the prefix. |
How about if a prefix is defined, string keys are required, if it's none any key is allowed with the understanding that collisions are easier. |
That works too. I can send a PR this weekend. |
That would be really helpful, thanks! |
Support for all keys when no key_prefix is given as per Issue pallets#1152
The cache is deprecated, see #1249 |
Currently RedisCache only accepts string keys due to the 'key_prefix' parameter that gets concatenated to each key. Even SimpleCache accepts integer keys and redis itself even accepts sets as keys.
I am using werkzeug 0.12.2 and Python 3.6.1
The text was updated successfully, but these errors were encountered: