wp_ai_client_cache_group
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_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 );