Title: WP_AI_Client_Cache::delete
Published: May 20, 2026

---

# WP_AI_Client_Cache::delete( string $key ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#wp--skip-link--target)

Delete an item from the cache by its unique key.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#parameters)󠁿

 `$key`stringrequired

The unique cache key of the item to delete.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#return)󠁿

 bool True if the item was successfully removed. False if there was an error.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#source)󠁿

    ```php
    public function delete( $key ): bool {
    	return wp_cache_delete( $key, self::CACHE_GROUP );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php#L76)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php#L76-L78)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_cache_delete()](https://developer.wordpress.org/reference/functions/wp_cache_delete/)`wp-includes/cache.php` |

Removes the cache contents matching key and group.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_ai_client_cache/delete/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_ai_client_cache%2Fdelete%2F)
before being able to contribute a note or feedback.