-
Notifications
You must be signed in to change notification settings - Fork 76
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
shouldReloadAll will change in Ember Data 2.0 #79
Comments
The new behavior aims to optimize performance. The idea in Ember Data 2.0 is to return a cached version immediately and than refetch in the background. For pouchdb the fetch isn't expensive because we don't need an ajax request. I guess it's best to always reload: // Reload behavior
shouldReloadRecord: function() { return true; },
shouldReloadAll: function() { return true; },
shouldBackgroundReloadRecord: function() { return true; },
shouldBackgroundReloadAll: function() { return true; } |
Perhaps we should implement this in the ember-pouch adapter by default. |
👍 |
I will write a PR for this. |
The change watcher already provides automatic refreshing of cached records in a way that's more efficient than this ember-data feature — it updates the store-cached record as soon as it is changed (not just when
|
@rsutphin Oh, just now saw your comments. I still think enabling the new Reload some time after 2.0 is released is better. .0 versions are not always OK ;-) |
… records. See pouchdb-community#79 and pouchdb-community#80 for discussions of why, and why this covers the individual record case only.
… records. See pouchdb-community#79 and pouchdb-community#80 for discussions of why, and why this covers the individual record case only.
Addressed by #83. |
Thanks! |
I get this deprecation warning:
Ember Inspector (Deprecation Trace): The default behavior of shouldReloadAll will change in Ember Data 2.0 to always return false when there is at least one "author" record in the store. If you would like to preserve the current behavior please override shouldReloadAll in your adapter:application and return true.
Do we need to change something? Is the new behavior better?
The text was updated successfully, but these errors were encountered: