Suspend cache invalidation while importing posts with WP importer

git-svn-id: https://develop.svn.wordpress.org/trunk@9106 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-10-09 00:50:52 +00:00
parent 680d9c369f
commit ec205359bc
3 changed files with 27 additions and 1 deletions

View File

@@ -2861,7 +2861,11 @@ function update_post_cache(&$posts) {
* @param int $id The Post ID in the cache to clean
*/
function clean_post_cache($id) {
global $wpdb;
global $_wp_suspend_cache_invalidation, $wpdb;
if ( !empty($_wp_suspend_cache_invalidation) )
return;
$id = (int) $id;
wp_cache_delete($id, 'posts');