mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Clean up cache re-init code in Multisite. Props nacin. fixes #12065
git-svn-id: https://develop.svn.wordpress.org/trunk@12888 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -318,13 +318,15 @@ function wp_set_wpdb_vars() {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
function wp_start_object_cache() {
|
||||
global $_wp_using_ext_object_cache;
|
||||
if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
|
||||
require_once ( WP_CONTENT_DIR . '/object-cache.php' );
|
||||
$_wp_using_ext_object_cache = true;
|
||||
} else {
|
||||
require_once ( ABSPATH . WPINC . '/cache.php' );
|
||||
$_wp_using_ext_object_cache = false;
|
||||
if ( ! function_exists( 'wp_cache_init' ) ) {
|
||||
global $_wp_using_ext_object_cache;
|
||||
if ( file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
|
||||
require_once ( WP_CONTENT_DIR . '/object-cache.php' );
|
||||
$_wp_using_ext_object_cache = true;
|
||||
} else {
|
||||
require_once ( ABSPATH . WPINC . '/cache.php' );
|
||||
$_wp_using_ext_object_cache = false;
|
||||
}
|
||||
}
|
||||
|
||||
wp_cache_init();
|
||||
|
||||
Reference in New Issue
Block a user