/** * Clear cache command callback * @param string $command * @param array $options * @param array $params * @return void */ public function doClearCache($command, $options, $params) { $this->cleanupParams($params); try { $packager = new Mage_Connect_Packager(); $ftp = empty($options['ftp']) ? false : $options['ftp']; if ($ftp) { list($cache, $ftpObj) = $packager->getRemoteCache($ftp); $cache->clear(); $packager->writeToRemoteCache($cache, $ftpObj); } else { $cache = $this->getSconfig(); $cache->clear(); } } catch (Exception $e) { $this->doError($command, $e->getMessage()); } }