Page MenuHomePhabricator

Snapshot: If datalayer loading fails, shorten caching
Closed, ResolvedPublic


When creating a new map, the pageprops might not be available yet. To prevent base maps from showing for too long, we need to shorten their caching time.

Event Timeline

Yurik created this task.Nov 9 2016, 8:07 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 9 2016, 8:07 PM
Restricted Application added a project: Discovery. · View Herald TranscriptNov 9 2016, 8:08 PM

I've seen where maps take over an hour to update - this is hugely frustrating for anyone trying to build a map onto a page and not knowing if it'll look like they think it will, until the cache is flushed.

Yurik added a comment.Nov 21 2016, 9:26 PM

It seems the easiest solution would be to simply throw an error if MW api returns an error when requesting specific data, as that will indicate that either the map URL is incorrect, or that the prop-pages database replication is not yet finished. Varnish will not cache the error (or just do it for a few seconds to avoid complete server meltdown), and a simple page refresh will quickly get the data.

Vort added a subscriber: Vort.Nov 30 2016, 1:38 PM
Yurik moved this task from Backlog to In progress on the Maps-Sprint board.Nov 30 2016, 7:42 PM
Yurik closed this task as Resolved.Dec 12 2016, 9:33 PM

Done, we now throw a 400 error to indicate the data is still missing.