wp_suspend_cache_invalidation( bool $suspend = true ): bool

In this article

Suspends cache invalidation.

Description

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.

Parameters

$suspendbooloptional
Whether to suspend or enable cache invalidation.

Default:true

Return

bool The current suspend setting.

Source

* @since 2.7.0
*
* @global bool $_wp_suspend_cache_invalidation
*
* @param bool $suspend Optional. Whether to suspend or enable cache invalidation. Default true.
* @return bool The current suspend setting.
*/

Changelog

VersionDescription
2.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.