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:
parent
9ff51215ad
commit
cbadb65a2a
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue