/** * count all site edits,files,pages,sites,users, * @return array */ public function getStats() { $key = wfForeignMemcKey('huiji', '', 'Huiji', 'getStats'); $stats = $this->cache->get($key); if ($stats != '') { return $stats; } else { $stats['edits'] = AllSitesInfo::getAllSiteEditCount(); $stats['files'] = AllSitesInfo::getAllUploadFileCount(); $stats['pages'] = AllSitesInfo::getAllPageCount(); $stats['sites'] = AllSitesInfo::getSiteCountNum(); $stats['users'] = AllSitesInfo::getUserCountNum(); $this->cache->set($key, $stats, 24 * 60 * 60); } return $stats; }