Changeset 9106
- Timestamp:
- 10/09/2008 12:50:52 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
wp-admin/import/wordpress.php (modified) (1 diff)
-
wp-includes/functions.php (modified) (1 diff)
-
wp-includes/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wordpress.php
r9100 r9106 718 718 $this->import_start(); 719 719 $this->get_authors_from_post(); 720 wp_suspend_cache_invalidation(true); 720 721 $this->get_entries(); 721 722 $this->process_categories(); 722 723 $this->process_tags(); 723 724 $result = $this->process_posts(); 725 wp_suspend_cache_invalidation(false); 724 726 $this->backfill_parents(); 725 727 $this->backfill_attachment_urls(); -
trunk/wp-includes/functions.php
r9051 r9106 2848 2848 } 2849 2849 2850 /** 2851 * Suspend cache invalidation. 2852 * 2853 * Turns cache invalidation on and off. Useful during imports where you don't wont to do invalidations 2854 * every time a post is inserted. Callers must be sure that what they are doing won't lead to an inconsistent 2855 * cache when invalidation is suspended. 2856 * 2857 * @since 2.7.0 2858 * 2859 * @param bool $suspend Whether to suspend or enable cache invalidation 2860 * @return bool The current suspend setting 2861 */ 2862 function wp_suspend_cache_invalidation($suspend = true) { 2863 global $_wp_suspend_cache_invalidation; 2864 2865 $current_suspend = $_wp_suspend_cache_invalidation; 2866 $_wp_suspend_cache_invalidation = $suspend; 2867 return $current_suspend; 2868 } 2869 2850 2870 ?> -
trunk/wp-includes/post.php
r9101 r9106 2862 2862 */ 2863 2863 function clean_post_cache($id) { 2864 global $wpdb; 2864 global $_wp_suspend_cache_invalidation, $wpdb; 2865 2866 if ( !empty($_wp_suspend_cache_invalidation) ) 2867 return; 2868 2865 2869 $id = (int) $id; 2866 2870
Note: See TracChangeset
for help on using the changeset viewer.