/** * reset all caches * @return boolean */ public static function resetAll() { $cacheManager = new Cache_Manager(); $list = $cacheManager->getRegistered(); foreach ($list as $name => $cache) { if ($cache) { $cache->clean(); } } return true; }
/** * Initialize Cache connections */ protected function _initCache() { if (!$this->_config->get('use_cache')) { return; } $cacheConfig = (include $this->_config->get('configs') . 'cache.php'); $cacheManager = new Cache_Manager(); foreach ($cacheConfig as $name => $cfg) { if ($cfg['enabled']) { $cacheManager->connect($name, $cfg); } } if ($this->_config->get('development')) { Debug::setCacheCores($cacheManager->getRegistered()); } $this->_cache = $cacheManager->get('data'); }