Changeset 971
- Timestamp:
- 04/18/07 15:15:33 (2 years ago)
- Files:
-
- trunk/wp-includes/wpmu-functions.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/wpmu-functions.php
r960 r971 176 176 $wpdb->show_errors(); 177 177 178 wp_cache_ set( $id, serialize( $details ), 'blog-details' );178 wp_cache_add( $id, serialize( $details ), 'blog-details' ); 179 179 180 180 $key = md5( $details->domain . $details->path ); 181 wp_cache_ set( $key, serialize( $details ), 'blog-lookup' );181 wp_cache_add( $key, serialize( $details ), 'blog-lookup' ); 182 182 } 183 183 … … 232 232 $value = $wpdb->get_var("SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = '$key' AND site_id = '{$wpdb->siteid}'"); 233 233 if ( ! is_null($value) ) { 234 wp_cache_ set($wpdb->siteid . $key, $value, 'site-options');234 wp_cache_add($wpdb->siteid . $key, $value, 'site-options'); 235 235 } elseif ( $default ) { 236 wp_cache_add($wpdb->siteid . $key, $default, 'site-options'); 236 237 return $default; 237 238 } else { 239 wp_cache_add($wpdb->siteid . $key, false, 'site-options'); 238 240 return false; 239 241 } … … 470 472 $blogs[$match[1]]->domain = $blog->domain; 471 473 $blogs[$match[1]]->path = $blog->path; 474 $blogs[$match[1]]->site_id = $blog->site_id; 472 475 } 473 476 } … … 669 672 if( $post == false ) { 670 673 $post = $wpdb->get_row( "SELECT * FROM {$wpmuBaseTablePrefix}{$blog_id}_posts WHERE ID = '{$post_id}'" ); 671 wp_cache_ set( $key, $post, "site-options", 120 );674 wp_cache_add( $key, $post, "site-options", 120 ); 672 675 } 673 676 … … 785 788 $link = get_permalink( $post_id ); 786 789 restore_current_blog(); 787 wp_cache_ set( $key, $link, "site-options", 30 );790 wp_cache_add( $key, $link, "site-options", 30 ); 788 791 } 789 792 return $link;
