public function deleteCache($client, $group = array()) { if ($this->_isAPCEnabled()) { $deleted = $this->_doHTTP('clear', $client, $group); if ($deleted === false) { throw new \Exception('Could not query ' . $this->url . 'console-cache.php'); } } else { $deleted = Cache::clear($client, $group); } return $deleted; }
public function purgeCache(InputInterface $input, OutputInterface $output) { if ($this->_isAPCEnabled()) { $result = $this->_doHTTP('purge'); } else { $result = Cache::purge(); } if ($result === false) { $output->writeln('<error>Error purging cached items</error>'); } else { $output->writeln('<info>All expired cache items have been deleted</info>'); } }
public function listCache(InputInterface $input, OutputInterface $output) { $client = $input->getOption('client'); if ($this->_isAPCEnabled()) { $items = $this->_doHTTP('list', $client); if ($items === false) { throw new \Exception('Could not query ' . $this->url . 'console-cache.php'); } } else { $items = Cache::getGroups($client); } return $items; }