objectcache: Log debug message for backend of MainObjectStash
Bug: T234361 Change-Id: I8e33591dc92198269f45a25d14014af633a351f2
This commit is contained in:
parent
e60d2394e0
commit
bd16c5eb34
2 changed files with 11 additions and 2 deletions
|
|
@ -372,7 +372,15 @@ return [
|
|||
"Cache type \"$id\" is not present in \$wgObjectCaches." );
|
||||
}
|
||||
|
||||
return ObjectCache::newFromParams( $mainConfig->get( 'ObjectCaches' )[$id] );
|
||||
$params = $mainConfig->get( 'ObjectCaches' )[$id];
|
||||
$logger = $params['logger'] = LoggerFactory::getInstance( $params['loggroup'] ?? 'objectcache' );
|
||||
|
||||
$store = ObjectCache::newFromParams( $params );
|
||||
$logger->debug( 'MainObjectStash using store {class}', [
|
||||
'class' => get_class( $store )
|
||||
] );
|
||||
|
||||
return $store;
|
||||
},
|
||||
|
||||
'MainWANObjectCache' => function ( MediaWikiServices $services ) : WANObjectCache {
|
||||
|
|
|
|||
|
|
@ -157,7 +157,8 @@ class ObjectCache {
|
|||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public static function newFromParams( $params ) {
|
||||
$params['logger'] = LoggerFactory::getInstance( $params['loggroup'] ?? 'objectcache' );
|
||||
$params['logger'] = $params['logger'] ??
|
||||
LoggerFactory::getInstance( $params['loggroup'] ?? 'objectcache' );
|
||||
if ( !isset( $params['keyspace'] ) ) {
|
||||
$params['keyspace'] = self::getDefaultKeyspace();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue