global $wgContLang, $wgMainCacheType;
$lang = $lang ? wfGetLangObj( $lang ) : $wgContLang;
- $cache = ObjectCache::newAccelerator( $wgMainCacheType );
+ $cache = ObjectCache::getLocalServerInstance( $wgMainCacheType );
static $dateFormatter = false;
if ( !$dateFormatter ) {
$dateFormatter = $cache->getWithSetCallback(
$cache->makeKey( 'dateformatter', $lang->getCode() ),
- 3600,
+ $cache::TTL_HOUR,
function () use ( $lang ) {
return new DateFormatter( $lang );
}