-
Notifications
You must be signed in to change notification settings - Fork 39
Discover doesn't update, can't refresh #1010
Comments
Dupe of #931 It broke with the crosswalk update, I'll see what I can do about fixing it. |
Pull-to-refresh itself isn't essential. When a user returns to the view, we need to check the server to make sure the cache is recent enough. |
@xmatthewx Oh, okay. I'll take a look at that, seems pretty straight forward though. |
After looking through the code with @xmatthewx, I feel like it's pretty likely there's been a caching issue from the start, and that we simply didn't notice it because pull-to-refresh was there. It seems what we really need is a timeout on the cache. https://github.com/mozilla/webmaker-core/blob/develop/src/lib/api.js#L47-L88 may be the culprit, as it seems that if a cache exists, it will always be used. If we can add a way to check the date of the stored cache and throw it out if it's older than X hours (or doesn't have a time stamp at all), that should take care of the issue. |
Thanks for the notes @alanmoo. I discussed this with @ryanwse. Here's the basic plan: We'll make sure we're storing a timestamp with the cache, and check that on view load. For now, a simple expiration after one hour will be good enough. Feature updates are done manually and not frequently. We just need to unlock permanent cache and prevent constant unnecessary updates. In a future release, if needed, we can actually fetch a small update to test the cache against. |
I looked at this in-depth today, the app appears to be showing 19 project entries in the discovery page, and I also get 19 entries when I query the I'd also like to note that in further testing, I can confirm there is no issue in regards to how caching works in Webmaker for Android, as it uses the LruCache caching system, a cache designed to organize information within it in order of how often its accessed, in order to improve speed & efficiency. This caching system is memory based, and is thrown away when the app is closed (along with the data). |
I just featured 2 more projects on the staging DB. You should now see 21. Let's schedule a time to talk over video to see if we can reproduce the error. My beta app on device still doesn't display the most recently featured projects. |
Problem appears to be with cache on the server. API doesn't return all the projects marked as featured in the DB. No obvious pattern with the missing projects. Most likely they were just featured later than the others. |
Closing. This is not a bug. More of a planning flaw. (Sigh) See #1016 |
Pull-to-refresh no longer works in the Discover view.
The most recently featured projects do not appear in Discover (even after 2 weeks). Cache doesn't seem to expire. This second issue might not be new ... might have been hidden by the ability to use pull-to-refresh.
cc @ryanwse @alanmoo @gvn
The text was updated successfully, but these errors were encountered: