X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Fobjectcache%2FObjectCache.php;h=3370e5b9d1a769a325e4a437e7c7b7076e821e4b;hb=c5a0fa5bed4c5aafdf0721c1d05978576107bd85;hp=cf9033b88f3319ed91f8cf3159846eac9c42cc49;hpb=9f53096051639c08cba43f9b72650ef5adee1df0;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; + } } }