Automattic\WooCommerce\Internal\Caches

VersionStringGenerator::get_cache_keyprivateWC 1.0

Get the cache key for an ID.

The ID is hashed to ensure a consistent key length and avoid issues with special characters or very long IDs.

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

Хуков нет.

Возвращает

Строку. The cache key.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_cache_key( $id ): string;
$id(строка) (обязательный)
The ID to get the cache key for.

Код VersionStringGenerator::get_cache_key() WC 11.0.1

private function get_cache_key( string $id ): string {
	return 'wc_version_string_' . md5( $id );
}