WP_REST_URL_Details_Controller::build_cache_key_for_url()privateWP 5.9.0

Utility function to build cache key for a given URL.

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.

WP_REST_URL_Details_Controller::build_cache_key_for_url() code WP 6.4.3

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