[wp-trac] [WordPress Trac] #54499: REST API: Use global transients for URL details endpoint.
WordPress Trac
noreply at wordpress.org
Wed Nov 24 02:17:01 UTC 2021
#54499: REST API: Use global transients for URL details endpoint.
---------------------------+-----------------------------
Reporter: peterwilsoncc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version:
Severity: normal | Keywords: needs-patch
Focuses: performance |
---------------------------+-----------------------------
The `WP_REST_URL_Details_Controller` caches the results of a URL request
for 60 minutes in the `set_cache()` method, it in turn calls the
`set_transient()` function.
As it's safe to assume the requested URL will return the same output
regardless of the site requesting it, global transients can be used with
`get_site_transient()` and `set_site_transient()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54499>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list