Merge "objectcache: remove ObjectCache::detectLocalServerCache() method"

This commit is contained in:
jenkins-bot 2021-03-08 05:57:14 +00:00 committed by Gerrit Code Review
commit 0aa2c00fde
2 changed files with 1 additions and 23 deletions

View file

@ -399,6 +399,7 @@ because of Phabricator reports.
* The internal class FirejailCommand was removed.
* Command::execute() now returns a Shellbox\Command\UnboxedResult instead of a
MediaWiki\Shell\Result. Any type hints should be updated.
* ObjectCache::detectLocalServerCache(), deprecated in 1.35, was removed.
* …
=== Deprecations in 1.36 ===

View file

@ -313,27 +313,4 @@ class ObjectCache {
return new EmptyBagOStuff( $params );
}
/**
* Detects which local server cache library is present and returns a configuration for it.
*
* @since 1.32
* @deprecated since 1.35 Use MediaWikiServices::getLocalServerObjectCache() or
* ObjectCache::makeLocalServerCache() instead.
* @return int|string Index to cache in $wgObjectCaches
*/
public static function detectLocalServerCache() {
wfDeprecated( __METHOD__, '1.35' );
if ( function_exists( 'apcu_fetch' ) ) {
// Make sure the APCu methods actually store anything
if ( PHP_SAPI !== 'cli' || ini_get( 'apc.enable_cli' ) ) {
return 'apcu';
}
} elseif ( function_exists( 'wincache_ucache_get' ) ) {
return 'wincache';
}
return CACHE_NONE;
}
}