-
Notifications
You must be signed in to change notification settings - Fork 167
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
Ambiguous behavior of clear
method with no namespace in Redis adapter
#1222
Comments
@mahdavipanah - the issue that we have is the lack of native namespace support in redis without using something like Redis Sets which causes major performance issues. I see both scenarios that we should support:
Thoughts? |
Let me know what you think. |
@mahdavipanah - I am going to update the document and then have scheduled time to add in the option in the future. Will close this now since the docs are updated. |
Description
When reading through the test cases for the Redis adapter I came across this test case (on this line) that says:
which matches the implementation meaning that if the namespace is not set the
clear
method will not remove any keys with thekeyPrefixSeparator
in it. This looks very surprising as it's not mentioned anywhere in the README. Actually, there is this description in the README that to me indicates a totally different behavior, which is that theclear
method will remove all keys if no namespace is set:Proposal
Options:
clear
method so it removes all keys (basically aFLUSHDB
) when no namespace is setI am in favor of option 1 for these reasons:
The text was updated successfully, but these errors were encountered: