ember.js - Ember-Data makes requests whenever it visits a route -
whenever navigate /users/1 /users ember-data makes new request. @ point isn't problem, when re-visit /comments route, dom elements duplicated - didn't happen on fixtures, when switched json appeared.
shouldn't requests cached? think read should , are.
ember-data last commit: 6140f7d (2013-04-11 15:48:46 -0700)
in reply comment
my routes set follows:
index route
app.indexroute = ember.route.extend redirect: -> this.transitionto 'users'
users route
app.usersroute = ember.route.extend setupcontroller: (controller, model) -> this.controllerfor('users').set 'content', app.user.find() this.controllerfor('currentuser').set 'content', app.currentuser.find 1
comments route
app.commentsroute = ember.route.extend model: -> app.comment.find() setupcontroller: (controller, model) -> @controllerfor('currentuser').set 'content', app.currentuser.find 1
i think looking is
app.comment.all();
which take models cached inside store opposed to
app.comment.find();
which fetch models server , reloads current store cache.
Comments
Post a Comment