Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_suspend_cache_addition [ WordPress Function ]

wp_suspend_cache_addition ( $suspend = null )
Parameters:
  • (bool) $suspend Optional. Suspends additions if true, re-enables them if false.
Returns:
  • (bool) The current suspend setting
Defined at:



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.

Suspension lasts for a single page load at most. Remember to call this function again if you wish to re-enable cache adds earlier.

Source


<?php
function wp_suspend_cache_addition$suspend null ) {
    static 
$_suspend false;

    if ( 
is_bool$suspend ) )
        
$_suspend $suspend;

    return 
$_suspend;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics