REST API: Use global transients for URL details endpoint.

Follow-up to [51973].

Props peterwilsoncc, costdev.
Fixes #54499.

Built from https://develop.svn.wordpress.org/trunk@52311


git-svn-id: http://core.svn.wordpress.org/trunk@51903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2021-12-03 11:36:09 +00:00
parent 9ff51215ad
commit cbadb65a2a
2 changed files with 3 additions and 3 deletions

View File

@ -451,7 +451,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
* @return mixed The value from the cache.
*/
private function get_cache( $key ) {
return get_transient( $key );
return get_site_transient( $key );
}
/**
@ -478,7 +478,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
*/
$cache_expiration = apply_filters( 'rest_url_details_cache_expiration', $ttl );
return set_transient( $key, $data, $cache_expiration );
return set_site_transient( $key, $data, $cache_expiration );
}
/**

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-beta1-52310';
$wp_version = '5.9-beta1-52311';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.