Title: clean_category_cache
Published: April 25, 2014
Last modified: April 28, 2025

---

# clean_category_cache( int $id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/clean_category_cache/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/clean_category_cache/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/clean_category_cache/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/clean_category_cache/?output_format=md#changelog)

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

Removes the category cache data based on ID.

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

 `$id`intrequired

Category ID

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

    ```php
    function clean_category_cache( $id ) {
    	clean_term_cache( $id, 'category' );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/category.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/category.php#L354)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/category.php#L354-L356)

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

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

Removes all of the term IDs from the cache.

  |

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

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

## User Contributed Notes

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