X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fobjectcache%2FObjectCache.php;h=3370e5b9d1a769a325e4a437e7c7b7076e821e4b;hb=15789bdd4b371a91abec0f454022f6c4284d4a7d;hp=cf9033b88f3319ed91f8cf3159846eac9c42cc49;hpb=c584722cc2e3d33edae58d46c2149063b3fc6d72;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php index cf9033b88f..3370e5b9d1 100644 --- a/includes/objectcache/ObjectCache.php +++ b/includes/objectcache/ObjectCache.php @@ -246,8 +246,14 @@ class ObjectCache { global $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType; $candidates = [ $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType ]; foreach ( $candidates as $candidate ) { + $cache = false; if ( $candidate !== CACHE_NONE && $candidate !== CACHE_ANYTHING ) { - return self::getInstance( $candidate ); + $cache = self::getInstance( $candidate ); + // CACHE_ACCEL might default to nothing if no APCu + // See includes/ServiceWiring.php + if ( !( $cache instanceof EmptyBagOStuff ) ) { + return $cache; + } } }