Merge "Replace newAccelerator() with getLocalServerInstance()"
[lhc/web/wiklou.git] / includes / parser / DateFormatter.php
index 78f7775..edb9ff1 100644 (file)
@@ -128,13 +128,13 @@ class DateFormatter {
                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 );
                                }