[wp-trac] [WordPress Trac] #43103: Reduce Plugin/theme API calls during core release windows

WordPress Trac noreply at wordpress.org
Wed Jan 17 05:49:57 UTC 2018


#43103: Reduce Plugin/theme API calls during core release windows
-----------------------------+-------------------
 Reporter:  dd32             |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  4.9.3
Component:  Upgrade/Install  |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-------------------
 During WordPress security release windows we reduce the API TTL to cause
 WordPress to check for updates more often. This allows us to roll out
 security patches in a shorter timeframe (instead of over ~12-24hrs).

 One unfortunately side effect of having the core check run more often, is
 that it triggers both the plugin and theme update checks to occur as well.
 This isn't normally an issue, however the plugin & theme update checks are
 relatively heavy calls which we can't simply cache, combine that with
 sites checking in every ~hour and WordPress.org's load increases
 dramatically.

 This happens as we trigger an auto-update attempt after each core update
 check, which then causes a plugin and theme update check to trigger (as
 they have their caches disabled during cron requests) as they're also part
 of auto-updates.

 The attached patch attempts to do two things:
 1. When checking for core updates, only trigger auto-updates if one
 actually exists and can be updated to. This is separate from the twice-
 daily auto-update cron task.
 2. Increases the cache timeout for plugins and themes in cron from 0
 seconds to 2 hours.

 I don't know how much (if any) impact `2.` will have, however I don't
 think it'll cause any noticeable issues, and re-using a cache from the
 last 2 hours on a twice-daily cron seems entirely reasonable to me. The
 only reason cron has a lower cache timeout is that it's not as much of an
 issue if the request is slow, as it's running non-interactively.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43103>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list