jodosha/redis-store — pull request #192 by freegenie (2013-06-17 23:03:30+00:00)
Title: Fixes #134 - delete_matched never being called

This fixes #134. The idea is to raise on delete_matched immediately, and have the `delete` method (the only one actually invoked by activesupport) forward to a clone of delete_matched only if a matching pattern is detected.

The pattern check may seem a bit naive but it serves the immediate need and may be improved in the future. A new class was introduced to encapsulate any future complexity in the pattern check.

This implementation mainly differs from other remarkable attempts (i.e. https://github.com/jodosha/redis-store/pull/167/files) because it tries to honour the `delete` and `delete_matched` notifications.