You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OneBusAway API
What's the recommended interval to locally cache trip data? A day seems safe, but almost not worth the hassle of caching. A week seems adequate, but there's no way of knowing when the data will become stale without looking at the underlying GTFS.
sjbarbeau
unread,
Sep 20, 2017, 11:25:45 PM9/20/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OneBusAway API
Hey Tim,
I assume you're talking about caching schedule (GTFS) data available via the OBA APIs.
The short answer is I don't know - to my knowledge all the official OBA apps operate completely online without any caching due to the information changing. As you say, there is no way to know when the underlying data is updated, especially when there are multiple agencies in a region.
The best I can suggest is to implement a hashing mechanism so you can retrieve the trip data and check if it's changed since the last update, so you don't have to go through updating your local cache again if it hasn't changed. Of course, this means you'd still need to hit the API again...
Sean
Sheldon A. Brown
unread,
Sep 21, 2017, 6:37:35 AM9/21/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to onebusa...@googlegroups.com
Cache away. As long as you like. But as Sean suggest, check to see
if the bundle has changed -- I would suggest you check hourly.
This API exposes the current bundle name. If it changes, you'll need
to invalidate your cache: