Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confused about parse local datastore & cache

I’m developing a iOS App and I want to have a level of offline support and I’m struggling out of local datastore or cache which approach to use as It appears that you can’t use these two feature together.

My query is quite basic and doesn’t change only the data that is retrieved can change.

if i used one of the cache policies, i get connection errors and nothing appears to be returned from the cache.

The workflow i’m after is on the lines of below.

->When connected to the internet perform query and store objects locally.

->if there is no internet retrieve previously downloaded objects.

like image 934
Jason Day Avatar asked Nov 09 '22 20:11

Jason Day


1 Answers

For the workflow you describe I think you're looking for a cache. If you would like the user could modify the data without connection and then, when there is wifi again, synchronise the local data with the remote data then you'll need the local datastore behavior. The problem for me is when you want both in different parts of the same app because in parse in you use local datastore you can't use the cache. I don't really understand why!

like image 113
abanet Avatar answered Nov 14 '22 22:11

abanet