/Line/{line}/Arrivals keeps showing previous information (cached?)

I am calling /Line/bakerloo/Arrivals about every 5 seconds.

I notice the current location keeps fluctuating, like it will say Left Paddington, then will say Between Paddington and Warkwick Avenue, then it will say At Paddington Platform 2, and do this a few times.

I have requested no Caching in the header, but still it seems to be doing weird non-linear in time responses.

Also it will not always show the stations in every call, nor are the updates well done, it will miss Leaving and Approaching many times.

I have implemented my own check to not take any data that’s older than the newest stations info on a particular train, but that seems egregious to have to do?

The advertised update frequency of the arrival feed is every 30 seconds, there is no guarantee of fresh data any more frequently than that. That is why you’re receiving cached data, and why you won’t manage to catch all approaching/leaving location descriptions.

I presume the reason behind the back-and-forth jumps in data is due to load-balanced servers returning data cached at slightly different times, but given that you’re not supposed to request data more frequently than around twice a minute, it’s not really an issue for the feed’s designed purpose.

1 Like

This helps hugely, thank you.

1 Like