Make WordPress Core


Ignore:
Timestamp:
12/08/2006 07:35:45 AM (20 years ago)
Author:
ryan
Message:

Some caching cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r4625 r4631  
    439439
    440440        if ( 'page' == $post->post_type ) {
    441                 wp_cache_delete( 'all_page_ids', 'pages' );
    442                 wp_cache_delete( 'get_pages', 'page' );
     441                clean_page_cache($postid);
    443442                $wp_rewrite->flush_rules();
    444443        }
    … …  
    651650        if ( 'page' == $post_type ) {
    652651                clean_page_cache($post_ID);
    653                 wp_cache_delete($post_ID, 'pages');
     652                $wp_rewrite->flush_rules();
    654653        } else {
    655654                clean_post_cache($post_ID);
    … …  
    690689                }
    691690        } else if ($post_type == 'page') {
    692                 wp_cache_delete( 'all_page_ids', 'pages' );
    693                 wp_cache_delete( 'get_pages', 'page' );
    694                 $wp_rewrite->flush_rules();
    695 
    696691                if ( !empty($page_template) )
    697692                        if ( ! update_post_meta($post_ID, '_wp_page_template',  $page_template))
    … …  
    817812                $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->post2cat, $wpdb->posts WHERE $wpdb->posts.ID=$wpdb->post2cat.post_id AND post_status = 'publish' AND post_type = 'post' AND category_id = '$cat_id'");
    818813                $wpdb->query("UPDATE $wpdb->categories SET category_count = '$count' WHERE cat_ID = '$cat_id'");
    819                 wp_cache_delete($cat_id, 'category');
     814                clean_category_cache($cat_id);
    820815                do_action('edit_category', $cat_id);
    821816        }
    822 
    823         wp_cache_delete('get_categories', 'category');
    824 
    825         do_action('edit_post', $post_ID);
    826817}       // wp_set_post_categories()
    827818
Note: See TracChangeset for help on using the changeset viewer.