Make WordPress Core


Ignore:
Timestamp:
01/11/2007 10:34:18 PM (20 years ago)
Author:
ryan
Message:

Use cache sets instead of adds. Props andy. fixes #3562

File:
1 edited

Legend:

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

    r4716 r4722  
    66        if ( ! $cat_ids = wp_cache_get('all_category_ids', 'category') ) {
    77                $cat_ids = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories");
    8                 wp_cache_add('all_category_ids', $cat_ids, 'category');
     8                wp_cache_set('all_category_ids', $cat_ids, 'category');
    99        }
    1010
    … …  
    149149                if ( ! $_category = wp_cache_get($category, 'category') ) {
    150150                        $_category = $wpdb->get_row("SELECT * FROM $wpdb->categories WHERE cat_ID = '$category' LIMIT 1");
    151                         wp_cache_add($category, $_category, 'category');
     151                        wp_cache_set($category, $_category, 'category');
    152152                }
    153153        }
Note: See TracChangeset for help on using the changeset viewer.