/**
  * Prepare data about hubs to display on Wikia homepage in hubs section
  *
  * @return Mixed|null
  */
 public function prepareHubsSectionSlots()
 {
     global $wgContLang;
     $langCode = $wgContLang->getCode();
     $hubSlot = WikiaDataAccess::cache(WikiaHomePageHelper::getHubSlotsMemcacheKey($langCode), 86400, function () use($langCode) {
         $hubSlot = [];
         $hubsSlots = $this->getHubsSectionSlots();
         $hubsV3List = $this->getHubsV3List($langCode);
         foreach ($hubsSlots['hub_slot'] as $slot => $hubId) {
             if (!empty($hubId)) {
                 $hubSlot[$slot] = $this->prepareHubV3Slot($hubsV3List[$hubId], $slot);
             }
         }
         $index = count($hubSlot);
         $marketingSlot = $this->prepareMarketingSlots($hubsSlots['marketing_slot'], $index);
         $hubSlot = array_merge($hubSlot, $marketingSlot);
         return $hubSlot;
     });
     return $hubSlot;
 }
 private function purgeWikiaHomepageHubs()
 {
     $lang = $this->wg->ContLang->getCode();
     WikiaDataAccess::cachePurge(WikiaHomePageHelper::getHubSlotsMemcacheKey($lang));
     $this->getHubsServicesHelper()->purgeHomePageVarnish($lang);
 }