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

Update cacheKeyForTree to cache the treeForVendor #279

Merged
merged 2 commits into from
Apr 18, 2019

Conversation

2hu12
Copy link
Contributor

@2hu12 2hu12 commented Apr 17, 2019

If an ember addon has a modified/overrided treeFor* method, the result of this treeFor method won't get cached, according to https://github.com/ember-cli/ember-cli/blob/master/lib/models/addon.js#L728. The cacheKeyForTree('vendor') will always return null, so if "ember-fetch" was depended by the app and other addons(e.g ember-data), it will recalculate the "treeForVendor" every time.
This PR make sure that the result of "treeForVendor" will be cached.

If an ember addon has a modified/overrided treeFor* method, the result of this treeFor method won't get cached, according to https://github.com/ember-cli/ember-cli/blob/master/lib/models/addon.js#L728. The `cacheKeyForTree('vendor')` will always return `null`, so if "ember-fetch" was depended by the app and other addons(e.g ember-data), it will recalculate the "treeForVendor" every time.
This PR make sure that the result of "treeForVendor" will be cached.
index.js Outdated Show resolved Hide resolved
@xg-wang xg-wang added the bug label Apr 17, 2019
@xg-wang xg-wang merged commit 5a6c1e5 into ember-cli:master Apr 18, 2019
@xg-wang
Copy link
Member

xg-wang commented Apr 18, 2019

Released as v6.5.1 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants