W3cubDocs

/WordPress

WP_REST_URL_Details_Controller::get_cache( string $key ): mixed

Utility function to retrieve a value from the cache at a given key.

Parameters

$keystringrequired
The cache key.

Return

mixed The value from the cache.

Source

private function get_cache( $key ) {
	return get_site_transient( $key );
}

Changelog

Version Description
5.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_url_details_controller/get_cache