Changeset 4722
- Timestamp:
- 01/11/2007 10:34:18 PM (19 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
-
category.php (modified) (2 diffs)
-
post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/category.php
r4716 r4722 6 6 if ( ! $cat_ids = wp_cache_get('all_category_ids', 'category') ) { 7 7 $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'); 9 9 } 10 10 … … 149 149 if ( ! $_category = wp_cache_get($category, 'category') ) { 150 150 $_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'); 152 152 } 153 153 } -
trunk/wp-includes/post.php
r4682 r4722 903 903 if ( ! $page_ids = wp_cache_get('all_page_ids', 'pages') ) { 904 904 $page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'"); 905 wp_cache_ add('all_page_ids', $page_ids, 'pages');905 wp_cache_set('all_page_ids', $page_ids, 'pages'); 906 906 } 907 907 … … 945 945 // Potential issue: we're not checking to see if the post_type = 'page' 946 946 // So all non-'post' posts will get cached as pages. 947 wp_cache_ add($_page->ID, $_page, 'pages');947 wp_cache_set($_page->ID, $_page, 'pages'); 948 948 } 949 949 }
Note: See TracChangeset
for help on using the changeset viewer.