sorentwo/readthis

A word about delete_matched

Closed this issue · 1 comments

As stated in the Readme the delete_matched is an O(n) operation. However this is what sometimes really is needed, regardless of the performance hit.
redis-activesupport gem provides this api with a warning in the documentation. After all this is providing sharp knives, isn't it?

Would you mind adding a delete_matched method anyway?

@dreyks Thanks for prompting me to look at this again. As it happens I have a need for delete_matched currently as well, but on a database that is large enough where using KEYS wasn't an option.

Please try out delete_matched on the master branch and let me know how it works for you. You can find documentation on rubydoc.info.