WP_REST_URL_Details_Controller::build_cache_key_for_url()privateWP 5.9.0

Utility function to build cache key for a given URL.

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

No Hooks.

Return

String. The cache key.

Usage

// private - for code of main (parent) class only
$result = $this->build_cache_key_for_url( $url );
$url(string) (required)
The URL for which to build a cache key.

Changelog

Since 5.9.0 Introduced.

Code of WP_REST_URL_Details_Controller::build_cache_key_for_url() WP 6.0

private function build_cache_key_for_url( $url ) {
	return 'g_url_details_response_' . md5( $url );
}