Changeset 5248
- Timestamp:
- 04/12/2007 02:27:12 AM (18 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/bookmark.php
r5119 r5248 137 137 138 138 $cache[ $key ] = $results; 139 wp_cache_ set( 'get_bookmarks', $cache, 'bookmark' );139 wp_cache_add( 'get_bookmarks', $cache, 'bookmark' ); 140 140 141 141 return apply_filters('get_bookmarks', $results, $r); -
trunk/wp-includes/category.php
r5234 r5248 9 9 if ( ! $cat_ids = wp_cache_get('all_category_ids', 'category') ) { 10 10 $cat_ids = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories"); 11 wp_cache_ set('all_category_ids', $cat_ids, 'category');11 wp_cache_add('all_category_ids', $cat_ids, 'category'); 12 12 } 13 13 … … 140 140 141 141 $cache[ $key ] = $categories; 142 wp_cache_ set( 'get_categories', $cache, 'category' );142 wp_cache_add( 'get_categories', $cache, 'category' ); 143 143 144 144 $categories = apply_filters('get_categories', $categories, $r); … … 161 161 if ( ! $_category = wp_cache_get($category, 'category') ) { 162 162 $_category = $wpdb->get_row("SELECT * FROM $wpdb->categories WHERE cat_ID = '$category' LIMIT 1"); 163 wp_cache_ set($category, $_category, 'category');163 wp_cache_add($category, $_category, 'category'); 164 164 } 165 165 } -
trunk/wp-includes/functions.php
r5240 r5248 230 230 if( is_object( $row) ) { // Has to be get_row instead of get_var because of funkiness with 0, false, null values 231 231 $value = $row->option_value; 232 wp_cache_ set($setting, $value, 'options');232 wp_cache_add($setting, $value, 'options'); 233 233 } else { // option does not exist, so we must cache its non-existence 234 234 $notoptions[$setting] = true; … … 295 295 foreach ( (array) $alloptions_db as $o ) 296 296 $alloptions[$o->option_name] = $o->option_value; 297 wp_cache_ set('alloptions', $alloptions, 'options');297 wp_cache_add('alloptions', $alloptions, 'options'); 298 298 } 299 299 return $alloptions; -
trunk/wp-includes/general-template.php
r5144 r5248 636 636 echo $output; 637 637 $cache[ $key ] = $output; 638 wp_cache_ set( 'get_calendar', $cache, 'calendar' );638 wp_cache_add( 'get_calendar', $cache, 'calendar' ); 639 639 } 640 640 -
trunk/wp-includes/post.php
r5244 r5248 1013 1013 if ( ! $page_ids = wp_cache_get('all_page_ids', 'pages') ) { 1014 1014 $page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'"); 1015 wp_cache_ set('all_page_ids', $page_ids, 'pages');1015 wp_cache_add('all_page_ids', $page_ids, 'pages'); 1016 1016 } 1017 1017 … … 1056 1056 // Potential issue: we're not checking to see if the post_type = 'page' 1057 1057 // So all non-'post' posts will get cached as pages. 1058 wp_cache_ set($_page->ID, $_page, 'pages');1058 wp_cache_add($_page->ID, $_page, 'pages'); 1059 1059 } 1060 1060 }
Note: See TracChangeset
for help on using the changeset viewer.