Setup: Remove debug message for "caches"
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 31 Aug 2019 15:33:06 +0000 (16:33 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 31 Aug 2019 19:47:43 +0000 (19:47 +0000)
This is currently forcing more object cache interfaces to be constructed
than might be needed in a given request. The configuration for these
interfaces is usually quite straight forward or can be trivially
verified from eval.php.

If we do want to log this, I would recommend doing it from the classes
constructor instead e.g. something like:

  LoggerFactory::getInstance('MessageCache')->debug( get_class( $cache ) );

Bug: T189966
Change-Id: I06dc6dfbdf274bb57e9295b0c757b8d52c02acbe

includes/Setup.php

index 2267800..c1c6ef2 100644 (file)
@@ -789,14 +789,6 @@ if ( $wgCommandLineMode ) {
 $wgMemc = ObjectCache::getLocalClusterInstance();
 $messageMemc = wfGetMessageCacheStorage();
 
-wfDebugLog( 'caches',
-       'cluster: ' . get_class( $wgMemc ) .
-       ', WAN: ' . ( $wgMainWANCache === CACHE_NONE ? 'CACHE_NONE' : $wgMainWANCache ) .
-       ', stash: ' . $wgMainStash .
-       ', message: ' . get_class( $messageMemc ) .
-       ', session: ' . get_class( ObjectCache::getInstance( $wgSessionCacheType ) )
-);
-
 // Most of the config is out, some might want to run hooks here.
 Hooks::run( 'SetupAfterCache' );