WP_REST_URL_Details_Controller::get_cache()privateWP 5.9.0

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

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.

WP_REST_URL_Details_Controller::get_cache() code WP 6.5.2

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