Make WordPress Core


Ignore:
Timestamp:
12/03/2021 11:34:55 AM (3 years ago)
Author:
audrasjb
Message:

REST API: Use global transients for URL details endpoint.

Follow-up to [51973].

Props peterwilsoncc, costdev.
Fixes #54499.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php

    r52008 r52311  
    452452     */
    453453    private function get_cache( $key ) {
    454         return get_transient( $key );
     454        return get_site_transient( $key );
    455455    }
    456456
     
    479479        $cache_expiration = apply_filters( 'rest_url_details_cache_expiration', $ttl );
    480480
    481         return set_transient( $key, $data, $cache_expiration );
     481        return set_site_transient( $key, $data, $cache_expiration );
    482482    }
    483483
Note: See TracChangeset for help on using the changeset viewer.