WP Tavern › Forums › Create Topic
John P. Bloch Generally, I agree. Suffice it to say that, for some things, cron simply wasn’t a viable solution for us. Additionally, this allowed us to refresh ONLY the data we needed to refresh. With traffic like TechCrunch’s, getting a lock for the task on a front end page load is indeed a challenge. We’ve used the object cache to do it in some cases, which (if done right) only results in a couple of duplicate processes. In the end, though, 2 extra processes is much preferable to tacking on up to 30 seconds for the API request. Also, the majority of our uses of the library are actually on hooks like save_post. Alex and Nico just wanted to show off uses that visitors can actually see on the front end. ;)
John P. Bloch
Generally, I agree. Suffice it to say that, for some things, cron simply wasn’t a viable solution for us. Additionally, this allowed us to refresh ONLY the data we needed to refresh.
With traffic like TechCrunch’s, getting a lock for the task on a front end page load is indeed a challenge. We’ve used the object cache to do it in some cases, which (if done right) only results in a couple of duplicate processes. In the end, though, 2 extra processes is much preferable to tacking on up to 30 seconds for the API request.
Also, the majority of our uses of the library are actually on hooks like save_post. Alex and Nico just wanted to show off uses that visitors can actually see on the front end. ;)
Name *
Email *
Website:
Topic Title (Maximum Length: 80):
Forum: — No forum —AI and WordPress Articles Blocks Showcase Discussions Events Introductions Jobs and Working in WordPress Podcast Episodes Site and Block Editor
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Email Address
Submit
Enter the destination URL
Or link to existing content