Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#54499 closed defect (bug) (fixed)

REST API: Use global transients for URL details endpoint.

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

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
5 years ago

  • Milestone Awaiting Review → 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.


5 years ago

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


5 years ago
#3

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

#4 @audrasjb
5 years ago

  • Keywords commit added
  • Owner set to audrasjb
  • Status new → assigned

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

#5 @audrasjb
5 years ago

  • Resolution → fixed
  • Status assigned → 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.