-
Notifications
You must be signed in to change notification settings - Fork 335
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
Move from proxies to well-defined adapters #441
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this one!
class << self | ||
def inherited(klass) | ||
@adapters << klass | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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