WP_AI_Client_Cache::get_cache_group(): string

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

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

Return

string Cache group name.

Source

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 );
}

Hooks

apply_filters( ‘wp_ai_client_cache_group’, string $group )

Filters the cache group used by the WP AI Client cache adapter.

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.