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

Popular posts from this blog

rest - Spring boot: Request method 'PUT' not supported -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

symfony - imagine_filter() not generating the correct url in LiipImagineBundle -