Make WordPress Core

Changeset 6252


Ignore:
Timestamp:
10/15/2007 08:11:30 PM (17 years ago)
Author:
ryan
Message:

Move all page and post caches to 'posts' cache group.

File:
1 edited

Legend:

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

    r6248 r6252  
    939939    global $wpdb;
    940940
    941     if ( ! $page_ids = wp_cache_get('all_page_ids', 'pages') ) {
     941    if ( ! $page_ids = wp_cache_get('all_page_ids', 'posts') ) {
    942942        $page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'");
    943         wp_cache_add('all_page_ids', $page_ids, 'pages');
     943        wp_cache_add('all_page_ids', $page_ids, 'posts');
    944944    }
    945945
     
    10581058
    10591059    $key = md5( serialize( $r ) );
    1060     if ( $cache = wp_cache_get( 'get_pages', 'page' ) )
     1060    if ( $cache = wp_cache_get( 'get_pages', 'posts' ) )
    10611061        if ( isset( $cache[ $key ] ) )
    10621062            return apply_filters('get_pages', $cache[ $key ], $r );
     
    11421142
    11431143    $cache[ $key ] = $pages;
    1144     wp_cache_set( 'get_pages', $cache, 'page' );
     1144    wp_cache_set( 'get_pages', $cache, 'posts' );
    11451145
    11461146    $pages = apply_filters('get_pages', $pages, $r);
     
    16431643    clean_post_cache($id);
    16441644
    1645     wp_cache_delete( 'all_page_ids', 'pages' );
    1646     wp_cache_delete( 'get_pages', 'page' );
     1645    wp_cache_delete( 'all_page_ids', 'posts' );
     1646    wp_cache_delete( 'get_pages', 'posts' );
    16471647
    16481648    do_action('clean_page_cache', $id);
Note: See TracChangeset for help on using the changeset viewer.