Opened 4 hours ago
#64171 new defect (bug)
Cache failed requests to WordPress.org API endpoints
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | |
| Focuses: | performance | Cc: |
Description
WordPress does not cache failed responses to various WordPress.org API endpoints (theme & plugin updates, etc).
When disconnected from a network this significantly impacts the performance of the dashboard as the requests are repeated as the user navigates:
- Main dashboard page: 2 requests leading to 20 second delay
- Ajax request to planet WP: 10 seconds delay, non blocking
- Plugin dashboard page: 2 requests to the same endpoint, 20 second delay
- Theme dashboard page: 2 requests to the same endpoint, 20 second delay
- Updates dashboard page: 6 requests (3 repeated), 60 second delay
- Site health dashboard page: 1 blocking request, 10 second delay
- Site health dotorg-communication endpoint: 20 second delay
- Site health debug page: 7 blocking requests, 70 second delay
Successful requests to most endpoints are cached for twelve hours, I think it would be wise to cache unsuccessful requests for some amount of time but probably a little less. 6 hours maybe???
For the site health screens, it may be wise to force uncached requests so up-to-date information is known but this ought to occur via the site's REST API so the requests are non blocking.
I picked this up while testing PR#7350.
To reproduce:
- Configure WordPress locally.
- Disconnect your computer from the network
- Run the WP CLI commands:
wp transient delete --all; wp transient delete --all --network; wp cache flush - Navigate around the WordPress admin
Note: See
TracTickets for help on using
tickets.