LightSys / kardia_android_crm

A Kardia CRM app for Android
5 stars 1 forks source link

Cached Data Invalidation #3

Open jakeprem opened 9 years ago

jakeprem commented 9 years ago

This seems like a relevant thing to implement in the app.

Several scenarios/ways to implement:

  1. Invalidate record based on new data. 1a. Could be used based on the Date_modified field on the JSON response returned by the REST API. 1b. Could use a new API endpoint, such as /crm/PARTNER_ID/modified, or something similar. This would be ideal because cached data could be validated/invalidated without doing a full request, thus saving data.
  2. Have a set timeout on the data, e.g. every 24 hours the data is invalid and needs to be repulled.

Cache invalidation of some sort will be important at some point once we start adding and modifying data in the app, as we will have to decide whether the local data or the server data is more recent and which set of data is considered authoritative.