sorentwo / readthis

:newspaper: Pooled active support compliant caching with redis
MIT License
506 stars 40 forks source link

A word about delete_matched #48

Closed dreyks closed 8 years ago

dreyks commented 8 years ago

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?

sorentwo commented 8 years ago

@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.