public static function reload() { $configClass = Kwf_Setup::$configClass; $config = new $configClass(Kwf_Setup::getConfigSection()); $cacheId = 'config_' . str_replace('-', '_', Kwf_Setup::getConfigSection()); Kwf_Config_Cache::getInstance()->save($config, $cacheId); if (extension_loaded('apc')) { $apcCacheId = $cacheId . getcwd(); apc_delete($apcCacheId); apc_delete($apcCacheId . 'mtime'); } Kwf_Config_Web::clearInstances(); Kwf_Registry::set('config', $config); }
public static function reload() { $configClass = Kwf_Setup::$configClass; $config = new $configClass(Kwf_Setup::getConfigSection()); $cacheId = 'config_' . str_replace(array('-', '.'), '_', Kwf_Setup::getConfigSection()); Kwf_Config_Cache::getInstance()->save($config, $cacheId); if (extension_loaded('apc')) { $apcCacheId = $cacheId . getcwd(); apc_delete($apcCacheId); apc_delete($apcCacheId . 'mtime'); if (PHP_SAPI == 'cli') { Kwf_Util_Apc::callClearCacheByCli(array(array('cacheIds' => $apcCacheId . ',' . $apcCacheId . 'mtime'))); } Kwf_Cache_SimpleStatic::clear('config-'); } Kwf_Config_Web::clearInstances(); Kwf_Registry::set('config', $config); }