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

shouldBackgroundReloadRecord == true appears to ignore the cache #3484

Closed
jerel opened this issue Jul 2, 2015 · 3 comments
Closed

shouldBackgroundReloadRecord == true appears to ignore the cache #3484

jerel opened this issue Jul 2, 2015 · 3 comments

Comments

@jerel
Copy link

jerel commented Jul 2, 2015

I'm upgrading an app to Ember 1.3.2 and Ember Data 1.3.4. To acknowledge deprecations I added:

shouldReloadAll: function() {
  return false;
},
shouldBackgroundReloadRecord: function() {
  return true;
},

And I'm seeing strange behavior with regards to locally cached models.

The following scenario causes the same records to be fetched from the api many times even though all channels were preloaded by a parent model:

  model: function() {
    return this.store.peekAll('message');
  },

  {{#each model as |message| }}
    {{message.channel.name}}
  {{/each}}

To display a list of messages /api/channels/1 is called ~20 times within the same runloop.

@wecc
Copy link
Contributor

wecc commented Jul 3, 2015

Thanks for reporting!

I think this should be fixed by #3468

@HeroicEric
Copy link
Member

@jerel can you confirm this was fixed by #3468 ?

@bmac
Copy link
Member

bmac commented Dec 23, 2015

Closing this should have been fixed by #3468.

@bmac bmac closed this as completed Dec 23, 2015
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

No branches or pull requests

4 participants