Tested that parser cache keys stay the same, before and after this
change.
Also use the more obvious ObjectCache::getLocalClusterInstance() instead
of looking up the main cache type in config and using
ObjectCache::getInstance().
Change-Id: Icef646b3c05e732ef4079d6900e6bce111debf2b
$pageid = $article->getId();
$renderkey = (int)( $wgRequest->getVal( 'action' ) == 'render' );
$pageid = $article->getId();
$renderkey = (int)( $wgRequest->getVal( 'action' ) == 'render' );
- $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" );
+ $key = $this->mMemc->makeKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" );
* @return mixed|string
*/
protected function getOptionsKey( $page ) {
* @return mixed|string
*/
protected function getOptionsKey( $page ) {
- return wfMemcKey( 'pcache', 'idoptions', $page->getId() );
+ return $this->mMemc->makeKey( 'pcache', 'idoptions', $page->getId() );
+ $cache = ObjectCache::getLocalClusterInstance();
+ $key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
$value = sprintf( "%08d", static::CACHE_VERSION ) . $tree;
- $cache = ObjectCache::getInstance( $config->get( 'MainCacheType' ) );
$cache->set( $key, $value, 86400 );
LoggerFactory::getInstance( 'Preprocessor' )
$cache->set( $key, $value, 86400 );
LoggerFactory::getInstance( 'Preprocessor' )
- $cache = ObjectCache::getInstance( $config->get( 'MainCacheType' ) );
+ $cache = ObjectCache::getLocalClusterInstance();
+ $key = $cache->makeKey(
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );
defined( 'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
md5( $text ), $flags );