ACTIVE Network API Developer Blog
Tips & Tricks: Caching Golf API data to speed up your website
In order to speed up the website you can use 'ListTeetimes2' method and cache the data from 'GetRateInfo' since that very seldom changes (cache for 24h or so).
You can probably cache tee times for 30 min or so, but should call VerifyTeetime when a user attempts to select a time to verify it's still there, and have a solid way to deal with disappearing tee times (when the times are gone because of cache lag).
Also, Limit the amount of data to shown on the first visit from the user. Requesting 100s of courses will always take a long time. Maybe you can do aggressive caching (every few hours or so) when you display a large list and then less caching when the result set is narrowed down by the user. Displaying a bunch of tee times on the initial landing page without knowing what the user wants is a little wasteful.
Hope this helps! Let us know what other issues you've come across and we'll try to provide soem tips about how to improve your API implementation. Leave a comment below.
0 Comments
Please sign in to post a comment.