Make WordPress Core

Opened 2 months ago

Closed 7 weeks ago

#54499 closed defect (bug) (fixed)

REST API: Use global transients for URL details endpoint.

Reported by: peterwilsoncc Owned by: audrasjb
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch has-unit-tests commit
Focuses: performance Cc:

Description

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().

Change History (5)

#1 @hellofromTonya
8 weeks ago

  • Milestone changed from Awaiting Review to 5.9

Pulling this into 5.9 as URL Details endpoint is introduced in 5.9.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


8 weeks ago

This ticket was mentioned in PR #2000 on WordPress/wordpress-develop by costdev.


7 weeks ago

  • Keywords has-patch has-unit-tests added; needs-patch removed

#4 @audrasjb
7 weeks ago

  • Keywords commit added
  • Owner set to audrasjb
  • Status changed from new to assigned

Thanks @costdev, the PR looks good to me.
Self assigning for commit consideration.

#5 @audrasjb
7 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 52311:

REST API: Use global transients for URL details endpoint.

Follow-up to [51973].

Props peterwilsoncc, costdev.
Fixes #54499.

Note: See TracTickets for help on using tickets.