Advertisements

wp_suspend_cache_addition

Definition:
function wp_suspend_cache_addition( $suspend = null ) {}

Temporarily suspend cache additions.
Stops more data being added to the cache, but still allows cache retrieval. This is useful for actions, such as imports, when a lot of data would otherwise be almost uselessly added to the cache.

Parameters

  • bool $suspend: Optional. Suspends additions if true, re-enables them if false.

Return values

returns:The current suspend setting

Source code

function wp_suspend_cache_addition( $suspend = null ) {

	static $_suspend = false;



	if ( is_bool( $suspend ) )

		$_suspend = $suspend;



	return $_suspend;

}

17846

Advertisements

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:

WordPress.com Logo

You are commenting using your WordPress.com 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: