Page MenuHomePhabricator

As a user, I shouldn't need to re-download the same data
Closed, ResolvedPublic

Description

Steps to repro

  1. Launch the app, load the feed
  2. Lock the screen
  3. Unlock the screen

Also an issue with:

  • Search (cache individual query results)
  • Nearby (cache results for specific location)
  • Site info (e.g. "Main page")
  • Most read (pageviews data and previews)

Expected results

Cached data is displayed, expired data is re-fetched.

Actual results

All data is always refetched.


Dev notes

We're only storing feed data in memory, in an NSCache. Since that's purged when the app goes to the background, we have to re-download everything. Some options are:

  • Use NSURLCache + maxage response headers
    • We should be using this for all cache control, but has implications for CoreData
  • Use some other manual, persistent caching solution
    • NSCoding + manual expiration
    • CoreData
    • etc.

Event Timeline

BGerstle-WMF renamed this task from As a user, I shouldn't need to re-download the same content for the feed over and over again to As a user, I shouldn't need to re-download the same data.Mar 2 2016, 9:14 PM
BGerstle-WMF updated the task description. (Show Details)
JMinor triaged this task as Medium priority.Mar 7 2016, 9:09 PM
JMinor subscribed.

The app is not good about network usage. Suggest we consider this as part of CoreData update plans.

Blocked by feed loading changes T138051

Once that ticket is complete we should revisit if any of the above improvements are still valid/needed.

LGoto claimed this task.
LGoto subscribed.

Closed in iOS board grooming.