Skip to content
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

Remove Mobility::Backend#apply_plugin #454

Merged
merged 3 commits into from
Oct 31, 2020
Merged

Remove Mobility::Backend#apply_plugin #454

merged 3 commits into from
Oct 31, 2020

Conversation

shioyama
Copy link
Owner

This method should not exist; it's only there for backends to hook into the cache plugin. Let's see if we can get rid of it.

We know the dependencies are satisfied since the backend plugin only has
one: attributes, and it's declared with "include: before".
The name +apply_plugin+ falsely indicates that this is a generic method,
when in fact it has a very specific use case in the cache plugin. Let's
remove it and just make this explicit, so now the cache plugin looks for
a method on the backend, which if present will be called, otherwise
defaults to simple cache implementation.

This is not beautiful but I think better since it reduces clutter and
complexity in the base Mobility::Backend module.
@shioyama shioyama merged commit 030b250 into master Oct 31, 2020
@shioyama shioyama deleted the remove_apply_plugin branch November 1, 2020 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant