WP_AI_Client_Cache::get_cache_group
Retrieves the cache group used for cache operations, applying a filter for customization.
Method of the class: WP_AI_Client_Cache{}
Hooks from the method
Returns
string. Cache group name.
Usage
// private - for code of main (parent) class only $result = $this->get_cache_group(): string;
Changelog
| Since 7.1.0 | Introduced. |
WP_AI_Client_Cache::get_cache_group() WP AI Client Cache::get cache group code WP 7.1
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 );
}