Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WP_REST_URL_Details_Controller::get_cache() WordPress Method
The get_cache() method is used to retrieve the cached results of a given REST API request. This can be useful for reducing the number of requests made to the server, or for retrieving data that is not yet available via the REST API.
WP_REST_URL_Details_Controller::get_cache( string $key ) #
Utility function to retrieve a value from the cache at a given key.
Parameters
- $key
(string)(Required)The cache key.
Return
(mixed) The value from the cache.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-url-details-controller.php
private function get_cache( $key ) { return get_site_transient( $key ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |