Breeze: how to tell if the query returned is from local cache or remote server? -
i know can call function query locally, if possible, or remotely. there way tell if result local or remote? remember read it, couldn't find anymore.
manager.fetchentitybykey('employee', employeeid, true) .then(function(data) { employee(data.entity); });
use 'fromcache' boolean property on promise result.
manager.fetchentitybykey('employee', employeeid, true).then(function(data) { var employee = data.entity var wasfoundincache = data.fromcache; });
see: http://www.breezejs.com/sites/all/apidocs/classes/entitymanager.html#method_fetchentitybykey
Comments
Post a Comment