nguyenmp / bisque

An Android client for https://lobste.rs/
MIT License
1 stars 0 forks source link

Refreshing spinner goes away when we have a cache hit #4

Open nguyenmp opened 9 years ago

nguyenmp commented 9 years ago

I expect the server hit to cause the spinner to go away, not a cache hit

nguyenmp commented 9 years ago

This really requires a rethinking of how we fetch data. There's primarily three locations where it comes form.

  1. Disk: This is our long term cache. Data is pushed onto the disk whenever we get a result from the network. We do not push things like metafication to the disk because this is handled by our DB.
  2. Arguments/State: This is basically like a memory cache for us. We load things out of bundles and push things into bundles because that "memory" is our state.
  3. Network.

Initial load fires all three and ignores them in a waterfall style. Network always succeeds and the disk cache will most likely be ignored if it's too slow.

This will probably make us take a step away from Loaders because they put a memory cache in front of a lot of things that we don't really need to have memory cached, and it confuses the whole spinner.