mardi 5 janvier 2016

Ember-Data cache for queries with params

  • Ember-Data caching in the > 1.13 world works fine as long as the find is fed with ids: /songs?ids=1&ids=2&ids=3 (Ember 1.13.11).
  • In our use case the number of ids in case of one-to-many associations are high, typically more than 50.
  • Because of the request length, Ember splits this in multiple requests to the backend. This increases load on the backend and delays the frontend, BUT the ember-data cache works fine.
  • When I switch to /songs?playlist=1 which features a static parameter playlist, the backend response is all the same, BUT one request only, faster in total.
  • But: Ember-data does not cache it (works as designed).

How can I use the second approach and get caching?

Thanks, Manuel




Aucun commentaire:

Enregistrer un commentaire