Polymer / hn-polymer-2

Polymer Hacker News clone
158 stars 23 forks source link

Articles don't refresh #3

Closed esprehn closed 7 years ago

esprehn commented 7 years ago

Even after relaunching the app repeatedly it still shows an old list of Top articles. Looks like it's pulling stale data from an offline storage.

dfreedm commented 7 years ago

Yeah, the sw-precache-config has "fastest" for each cache, which probably means the cache wins 100% of the time: https://github.com/Polymer/hn-polymer-2/blob/master/sw-precache-config.js#L25

dfreedm commented 7 years ago

Edge caching for the API endpoint might also be doing the wrong thing

esprehn commented 7 years ago

It's still stale to me now 24 hours later. So this seems like whatever is cached locally is always winning and it's never picking up new content. All the other HN apps seem to update, so it looks like something specific to what this one did.

esprehn commented 7 years ago

This is still broken. The app is showing​ 10 day old articles still, and says "3 hours ago" even though the articles are very old.

dfreedm commented 7 years ago

Yep, still haven't had the time to fix the caching yet.

dfreedm commented 7 years ago

Confirmed after reloading from new deployment

sorvell commented 7 years ago

Re-opening as the Firebase function we're using still seems to be incorrectly over-caching. This cache header looks like it's not being respected.

dfreedm commented 7 years ago

Looks like this is a firebase issue w/edge caching headers conflicting with our cache-control header

dfreedm commented 7 years ago

Ok, got word that this is fixed on the Firebase side now, so I'll redeploy and verify in a few minutes.

dfreedm commented 7 years ago

Ok, looks like this is working now!