Yoast\WP\SEO\Dashboard\Infrastructure\Browser_Cache

Browser_Cache_Configuration::get_storage_prefixprivateYoast 1.0

Gets the prefix for the client side cache key.

Cache key is scoped to user session and blog_id to isolate the cache between users and sites (in multisite).

Метод класса: Browser_Cache_Configuration{}

Хуков нет.

Возвращает

Строку.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_storage_prefix();

Код Browser_Cache_Configuration::get_storage_prefix() Yoast 27.7

private function get_storage_prefix() {
	$current_user  = \wp_get_current_user();
	$auth_cookie   = \wp_parse_auth_cookie();
	$blog_id       = \get_current_blog_id();
	$session_token = ( $auth_cookie['token'] ?? '' );

	return \wp_hash( $current_user->user_login . '|' . $session_token . '|' . $blog_id );
}