WP_REST_URL_Details_Controller::get_cache()privateWP 5.9.0

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

{} It's a method of the class: WP_REST_URL_Details_Controller{}

No Hooks.

Return

Mixed. The value from the cache.

Usage

// private - for code of main (parent) class only
$result = $this->get_cache( $key );
$key(string) (required)
The cache key.

Changelog

Since 5.9.0 Introduced.

Code of WP_REST_URL_Details_Controller::get_cache() WP 6.0

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