Suspend cache invalidation.
Turns cache invalidation on and off. Useful during imports where you don’t want to do invalidations every time a post is inserted. Callers must be sure that what they are doing won’t lead to an inconsistent cache when invalidation is suspended.
(bool) (Optional) Whether to suspend or enable cache invalidation.
Default value: true
(bool) The current suspend setting.
File: wp-includes/functions.php
function wp_suspend_cache_invalidation( $suspend = true ) { global $_wp_suspend_cache_invalidation; $current_suspend = $_wp_suspend_cache_invalidation; $_wp_suspend_cache_invalidation = $suspend; return $current_suspend; }
Version | Description |
---|---|
2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_suspend_cache_invalidation