Created
January 8, 2016 10:54
-
-
Save RuiAAPeres/165ddbb03b5bc56d2459 to your computer and use it in GitHub Desktop.
Requirements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. The work should only be started when we spend more than 0.5s in the ViewController | |
| 2. Check if there is data in the cache | |
| 2.1 Success: Show it and start an internet request if the cache is outdated | |
| 2.1.1 Success: Show the data | |
| 2.1.2 Failed: Silently fail | |
| 2.2 Fail: Try to get data from the internet | |
| 2.2.1 Success: Show it | |
| 2.2.2 Fail: Show the error | |
| 3. Every 5 minutes start internet request check, if cache is outdated && ViewController is visible | |
| 3.1 Success: Show the data | |
| 3.2 Failed: Silently fail | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment