Implementing Offline Caching

To support offline caching, Mobile Sync requires you to supply your own implementations of a few tasks:

  • Tracking offline status and specifying the appropriate cache control flag for CRUD operations, as shown in the app.models.Account example.

  • Collecting records that were edited locally and saving their changes to the server when the device is back online. The following example uses a SmartStore cache query to retrieve locally changed records, then calls the SyncPage function to render the results in HTML.