Move from proxies to well-defined adapters#441
Conversation
grzuy
left a comment
There was a problem hiding this comment.
Thank you for working on this one!
| class << self | ||
| def inherited(klass) | ||
| @adapters << klass | ||
| end |
There was a problem hiding this comment.
Nice!
Will just this inherited piece suffice to add support to "add your own cache backend store", by making proxies lookup dynamic instead of hard-coded?
If so, I'll prefer to have that as a small first step, and then re-consider the other changes.
There was a problem hiding this comment.
Yes.
If so, I'll prefer to have that as a small first step, and then re-consider the other changes.
You mean extracting as a separate PR?
There was a problem hiding this comment.
Yes.
Awesome.
If so, I'll prefer to have that as a small first step, and then re-consider the other changes.
You mean extracting as a separate PR?
Yes :-)
c90893f to
d6bc89e
Compare
|
Updated this accordingly to master. Added tests. This pr became a little bold. |
|
This can be considered backwards incompatible change, so it should be considered for |
|
Hey, @grzuy |
This is a work in progress (failing tests, missing new tests and documentation), but basically is ready for review to verify basic ideas.
To add new adapters, all is needed is inheriting from base class and implementing required methods:
Closes #380