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

---

# wp_cache_close(): true

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_cache_close/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/functions/wp_cache_close/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_cache_close/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_cache_close/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_cache_close/?output_format=md#changelog)

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

Closes the cache.

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

This function has ceased to do anything since WordPress 2.5. The functionality was
removed along with the rest of the persistent cache.

This does not mean that plugins can’t implement this function when they need to 
make sure that the cache is cleaned up after WordPress no longer needs it.

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

 true Always returns true.

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

    ```php
    function wp_cache_close() {
    	return true;
    }
    ```

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

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

| Used by | Description | 
| [shutdown_action_hook()](https://developer.wordpress.org/reference/functions/shutdown_action_hook/)`wp-includes/load.php` |

Runs just before PHP shuts down execution.

  |

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

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

## User Contributed Notes

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