You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our API to fetch feedback, uploads and nearby edits takes a significant amount of times and often it times out. It might be worthwhile to cache the results and display the cached data first. We can call the API asynchronously and update the view once the calls succeed.
As these results don't change very often, it shouldn't affect user experience.
The text was updated successfully, but these errors were encountered:
Ideally, the app try to could count what has changed since the cache was taken.
Example:
User opens the achievements activity, a request is made and it returns upoads:60 wikidata:20
The user uploads 3 pictures, including 1 using Nearby. The numbers are kept as a "delta".
Eager to see their progress, the user opens the achievements activity again
The cache is still valid (for instance it has been less than 3 hours since last time), so use the cache, but add the delta, resulting in upoads:63 wikidata:21
This technique does not account for deleted pictures, but the user will not realize that until the next cache invalidation.
IMO, this approach can be used for statistics that are specific to the android app but for other statistics, it might cause confusion. For eg. if the user uploads a few pictures using the app and a few others using some other platform. Then the number would not match either with what he last saw or with his actual upload count.
Instead, what about showing a small text:
Last updated at: 12th May 4 PM
This would be easier to develop and would also not cause any discrepancy. Along with a text, we can a small refreshing icon to indicate that we are fetching the results again. The idea is to not show a blank screen ever.
This technique does not account for deleted pictures, but the user will not realize that until the next cache invalidation.
I was thinking that it might not be very helpful to invalidate the cache at all. Anyways every time the user opens this page, we make the API call async and update our cache (irrespective of the fact that he waits on the screen or not). Given this flow, do we really need to invalidate cache. With "last updated at" and refreshing icon text, the user will understand that the results are outdated.
Summary:
Our API to fetch feedback, uploads and nearby edits takes a significant amount of times and often it times out. It might be worthwhile to cache the results and display the cached data first. We can call the API asynchronously and update the view once the calls succeed.
As these results don't change very often, it shouldn't affect user experience.
The text was updated successfully, but these errors were encountered: