Changeset 55526 for trunk/src/wp-includes/query.php
- Timestamp:
- 03/10/2023 04:27:23 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r54962 r55526 1155 1155 $last_changed = wp_cache_get_last_changed( 'posts' ); 1156 1156 $cache_key = "find_post_by_old_slug:$key:$last_changed"; 1157 $cache = wp_cache_get( $cache_key, 'post s' );1157 $cache = wp_cache_get( $cache_key, 'post-queries' ); 1158 1158 if ( false !== $cache ) { 1159 1159 $id = $cache; 1160 1160 } else { 1161 1161 $id = (int) $wpdb->get_var( $query ); 1162 wp_cache_set( $cache_key, $id, 'post s' );1162 wp_cache_set( $cache_key, $id, 'post-queries' ); 1163 1163 } 1164 1164 … … 1198 1198 $last_changed = wp_cache_get_last_changed( 'posts' ); 1199 1199 $cache_key = "find_post_by_old_date:$key:$last_changed"; 1200 $cache = wp_cache_get( $cache_key, 'post s' );1200 $cache = wp_cache_get( $cache_key, 'post-queries' ); 1201 1201 if ( false !== $cache ) { 1202 1202 $id = $cache; … … 1207 1207 $id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts, $wpdb->postmeta AS pm_slug, $wpdb->postmeta AS pm_date WHERE ID = pm_slug.post_id AND ID = pm_date.post_id AND post_type = %s AND pm_slug.meta_key = '_wp_old_slug' AND pm_slug.meta_value = %s AND pm_date.meta_key = '_wp_old_date'" . $date_query, $post_type, get_query_var( 'name' ) ) ); 1208 1208 } 1209 wp_cache_set( $cache_key, $id, 'post s' );1209 wp_cache_set( $cache_key, $id, 'post-queries' ); 1210 1210 } 1211 1211 }
Note: See TracChangeset
for help on using the changeset viewer.