mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 19:20:03 +00:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user