Changeset 52311
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php
r52008 r52311 452 452 */ 453 453 private function get_cache( $key ) { 454 return get_ transient( $key );454 return get_site_transient( $key ); 455 455 } 456 456 … … 479 479 $cache_expiration = apply_filters( 'rest_url_details_cache_expiration', $ttl ); 480 480 481 return set_ transient( $key, $data, $cache_expiration );481 return set_site_transient( $key, $data, $cache_expiration ); 482 482 } 483 483 -
trunk/tests/phpunit/tests/rest-api/wpRestUrlDetailsController.php
r51973 r52311 94 94 95 95 // Disables usage of cache during major of tests. 96 add_filter( 'pre_ transient_' . $this->get_transient_name(), '__return_null' );96 add_filter( 'pre_site_transient_' . $this->get_transient_name(), '__return_null' ); 97 97 } 98 98 … … 342 342 public function test_will_return_from_cache_if_populated() { 343 343 $transient_name = $this->get_transient_name(); 344 remove_filter( "pre_ transient_{$transient_name}", '__return_null' );344 remove_filter( "pre_site_transient_{$transient_name}", '__return_null' ); 345 345 346 346 // Force cache to return a known value as the remote URL http response body. 347 347 add_filter( 348 "pre_ transient_{$transient_name}",348 "pre_site_transient_{$transient_name}", 349 349 static function() { 350 350 return '<html><head><title>This value from cache.</title></head><body></body></html>';
Note: See TracChangeset
for help on using the changeset viewer.