WP_AI_Client_Cache::get_cache_group │ private │ WP 7.1.0

Retrieves the cache group used for cache operations, applying a filter for customization.

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

Хуки из метода

Возвращает

string. Cache group name.

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

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

Список изменений

С версии 7.1.0 Введена.

Код WP_AI_Client_Cache::get_cache_group() WP 7.1.2

private function get_cache_group(): string {
	/**
	 * Filters the cache group used by the WP AI Client cache adapter.
	 *
	 * Allows integrators to change the object cache group under which AI client
	 * items are stored. This is useful for avoiding key collisions, creating
	 * environment-specific caches, or adapting to backend constraints.
	 *
	 * @since 7.1.0
	 *
	 * @param string $group The cache group.
	 */
	return (string) apply_filters( 'wp_ai_client_cache_group', self::CACHE_GROUP );
}