cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Change Offlinestore without sending a request

JonasX
Explorer
0 Likes
258

I am wondering if there is a possibility to make changes to an entity in offline store without creating an entry in the RequestQueue and send a Request to the backend with the next Upload.

The background is that I have one Online and one Offline service. When the user is making changes in Offline mode all changes are made in the offline store. With the next Upload they are uploaded as usual.

But when the user is making changes in Online mode I am making the change in both Online and Offline service. Online to send the requests Immediately and get the responses from backend, so that the user can react directly to the response from backend.
Offline because I want to have my offline store in sync and want to be able to show the changes to the user in the frontend.
But this means that I make changes to Offline Store that are now in my RequestQueue but they were already sent to the backend via OnlineService.
So what I'm looking for is a way to make changes to the offline storage that won't be uploaded and will be overwritten the next time I synchronize. Is this possible?

I am using MDK Client 24.7 iOS

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Likes

Instead of updating the offline store you should just run a download to sync the offline store to the backend and pickup the changes you sent via the online service.  Your download will ideally just do a delta sync and you can further just download the entity set that was updated via the online call versus updating all the entity sets.

The other option is the always write to offline but trigger an upload after the save to send to the backend right away.

Answers (0)