R
R
RaphaeI2018-03-24 14:12:17
SQLite
RaphaeI, 2018-03-24 14:12:17

How to use SQLite as cache in Swift?

I receive data from the server with a POST request and display it on the screen. I would like this data to be saved locally so that you can view it when there is no Internet. It comes to mind to store them in SQLite. Those. first I get data from the server, save it in SQLite, then I output it from SQLite. But questions arise: if after connecting the Internet it turns out that the data received earlier was deleted from the server or changed, then you need to determine the inconsistencies and change the data in SQLite. It also turns out that the volume of the application will grow.
How to implement caching in my case?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question