mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Use wp_cache_set instead of wp_cache_add in recent posts and archives widgets. props Denis-de-Bernardy, fixes #11580.
git-svn-id: https://develop.svn.wordpress.org/trunk@14486 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -906,7 +906,7 @@ function wp_get_archives($args = '') {
|
||||
if ( !isset( $cache[ $key ] ) ) {
|
||||
$arcresults = $wpdb->get_results($query);
|
||||
$cache[ $key ] = $arcresults;
|
||||
wp_cache_add( 'wp_get_archives', $cache, 'general' );
|
||||
wp_cache_set( 'wp_get_archives', $cache, 'general' );
|
||||
} else {
|
||||
$arcresults = $cache[ $key ];
|
||||
}
|
||||
@@ -928,7 +928,7 @@ function wp_get_archives($args = '') {
|
||||
if ( !isset( $cache[ $key ] ) ) {
|
||||
$arcresults = $wpdb->get_results($query);
|
||||
$cache[ $key ] = $arcresults;
|
||||
wp_cache_add( 'wp_get_archives', $cache, 'general' );
|
||||
wp_cache_set( 'wp_get_archives', $cache, 'general' );
|
||||
} else {
|
||||
$arcresults = $cache[ $key ];
|
||||
}
|
||||
@@ -949,7 +949,7 @@ function wp_get_archives($args = '') {
|
||||
if ( !isset( $cache[ $key ] ) ) {
|
||||
$arcresults = $wpdb->get_results($query);
|
||||
$cache[ $key ] = $arcresults;
|
||||
wp_cache_add( 'wp_get_archives', $cache, 'general' );
|
||||
wp_cache_set( 'wp_get_archives', $cache, 'general' );
|
||||
} else {
|
||||
$arcresults = $cache[ $key ];
|
||||
}
|
||||
@@ -972,7 +972,7 @@ function wp_get_archives($args = '') {
|
||||
if ( !isset( $cache[ $key ] ) ) {
|
||||
$arcresults = $wpdb->get_results($query);
|
||||
$cache[ $key ] = $arcresults;
|
||||
wp_cache_add( 'wp_get_archives', $cache, 'general' );
|
||||
wp_cache_set( 'wp_get_archives', $cache, 'general' );
|
||||
} else {
|
||||
$arcresults = $cache[ $key ];
|
||||
}
|
||||
@@ -1002,7 +1002,7 @@ function wp_get_archives($args = '') {
|
||||
if ( !isset( $cache[ $key ] ) ) {
|
||||
$arcresults = $wpdb->get_results($query);
|
||||
$cache[ $key ] = $arcresults;
|
||||
wp_cache_add( 'wp_get_archives', $cache, 'general' );
|
||||
wp_cache_set( 'wp_get_archives', $cache, 'general' );
|
||||
} else {
|
||||
$arcresults = $cache[ $key ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user