Title: clear_global_post_cache
Published: April 25, 2014
Last modified: February 24, 2026

---

# clear_global_post_cache( int $post_id )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#changelog)

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

This function has been deprecated since 3.0.0. Use [clean_post_cache()](https://developer.wordpress.org/reference/functions/clean_post_cache/)
instead.

Deprecated functionality to clear the global post cache.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/clear_global_post_cache/?output_format=md#see-also)󠁿

 * [clean_post_cache()](https://developer.wordpress.org/reference/functions/clean_post_cache/)

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

 `$post_id`intrequired

Post ID.

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

    ```php
    function clear_global_post_cache( $post_id ) {
    	_deprecated_function( __FUNCTION__, '3.0.0', 'clean_post_cache()' );
    }
    ```

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

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

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

Marks a function as deprecated and inform when it has been used.

  |

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

| Version | Description | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Deprecated. Use [clean_post_cache()](https://developer.wordpress.org/reference/functions/clean_post_cache/)  | 
| [MU (3.0.0)](https://developer.wordpress.org/reference/since/mu.3.0.0/) | Introduced. |

## User Contributed Notes

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