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.
Использование
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(строка)
- The cache group.
Список изменений
| С версии 7.1.0 | Введена. |
Где вызывается хук
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 );