wp_ai_client_cache_group filter-hookWP 7.1.0

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.

Usage

add_filter( 'wp_ai_client_cache_group', 'wp_kama_ai_client_cache_group_filter' );

/**
 * Function for `wp_ai_client_cache_group` filter-hook.
 * 
 * @param string $group The cache group.
 *
 * @return string
 */
function wp_kama_ai_client_cache_group_filter( $group ){
	// filter...
	return $group;
}
$group(string)
The cache group.

Changelog

Since 7.1.0 Introduced.

Where the hook is called

WP_AI_Client_Cache::get_cache_group()
wp_ai_client_cache_group
wp-includes/ai-client/adapters/class-wp-ai-client-cache.php 51
return (string) apply_filters( 'wp_ai_client_cache_group', self::CACHE_GROUP );

Where the hook is used in WordPress

Usage not found.