/** * @return array */ private function _getModulePaths() { $cacheKey = CM_CacheConst::Modules; $apcCache = new CM_Cache_Storage_Apc(); if (false === ($modulePaths = $apcCache->get($cacheKey))) { $fileCache = new CM_Cache_Storage_File(); $installation = new CM_App_Installation(DIR_ROOT); if ($installation->getUpdateStamp() > $fileCache->getCreateStamp($cacheKey) || false === ($modulePaths = $fileCache->get($cacheKey))) { $modulePaths = $installation->getModulePaths(); $fileCache->set($cacheKey, $modulePaths); } $apcCache->set($cacheKey, $modulePaths); } return $modulePaths; }
/** * @return array [namespace => pathRelative] */ protected function _getModulePaths() { return $this->_appInstallation->getModulePaths(); }