When the API is called you should be storing the return. Then when the page loads you call your stored data. For WP this means adding this return into the WP database. Most often this is the WP_Options, but you can create your own table is you wish.
The update script could be once a day, but then you would have to build it outside of WP as WP doesn’t have real cron jobs. they offer a pseudo cron that runs when the WP site is visited. This WP pseudo cron would be fine for your proposed application, but you would need to store a time stamp so this also doesn’t run every page load.
Hope that helps!


(
+1 rating, 1 votes, rated)
You need to be a registered member to rate this post.
Loading...