Use CACHE_ACCEL for SiteLists if on HHVM
authorMarius Hoch <hoo@online.de>
Sun, 19 Jul 2015 17:29:58 +0000 (12:29 -0500)
committerOri.livneh <ori@wikimedia.org>
Sun, 19 Jul 2015 18:16:33 +0000 (18:16 +0000)
Bug: T58602
Change-Id: I3eeedddeb79cfbee734cfe49fe86d32bf826040a

includes/site/SiteSQLStore.php

index d77f07b..e3230ff 100644 (file)
@@ -41,7 +41,7 @@ class SiteSQLStore extends CachingSiteStore {
         */
        public static function newInstance( ORMTable $sitesTable = null, BagOStuff $cache = null ) {
                if ( $cache === null ) {
-                       $cache = wfGetMainCache();
+                       $cache = wfGetCache( wfIsHHVM() ? CACHE_ACCEL : CACHE_ANYTHING );
                }
 
                $siteStore = new DBSiteStore();