The standard flush/Refresh offline oData functions are performed on all entities in the offline Store.
This, of course, has implications on mobile data and performance.
Is there a way to FLUSH/REFRESH only specific entities in the offline store?
You can write the entity you want to refresh or flush in the third parameter of the methods as an array of strings where each string is the name you put to each "entitySet" on the definingRequests object.
Imagine you defined this on the creation of the store:
"definingRequests" : {
"foo" : "/fooSet",
"bar" : "/barSet"
}
Then, if you only want to refresh the foo entity, the refresh method will be like this:
store.refresh(refreshCallback, errorCallback, ["foo"], progressCallback);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With