get_wp_cache_key()
No Hooks.
Return
null
. Ничего (null).
Usage
get_wp_cache_key( $url );
- $url **
- -
Default: false
get_wp_cache_key() get wp cache key code WPSCache 1.11.0
function get_wp_cache_key( $url = false ) { global $wp_cache_request_uri, $wp_cache_gzip_encoding, $WPSC_HTTP_HOST; if ( ! $url ) { $url = $wp_cache_request_uri; } $server_port = isset( $_SERVER['SERVER_PORT'] ) ? intval( $_SERVER['SERVER_PORT'] ) : 0; // Prepare a tag to include in the cache key if the request is anything other than text/html $accept = wpsc_get_accept_header(); if ( $accept === 'text/html' ) { $accept_tag = ''; } else { $accept_tag = '-' . $accept; } return do_cacheaction( 'wp_cache_key', // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase wp_cache_check_mobile( $WPSC_HTTP_HOST . $server_port . preg_replace( '/#.*$/', '', str_replace( '/index.php', '/', $url ) ) . $wp_cache_gzip_encoding . wp_cache_get_cookies_values() . '-' . wpsc_get_accept_header() . $accept_tag ) ); }