function wp_suspend_cache_invalidation($suspend = true) {}

Suspend cache invalidation.
Turns cache invalidation on and off. Useful during imports where you don’t wont 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 $suspend: Whether to suspend or enable cache invalidation

Return values

returns:The current suspend setting

Source code

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;




No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: