Elgg  Version 6.1
CacheClearCommand.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Cli;
4 
8 class CacheClearCommand extends Command {
9 
13  protected function configure() {
14  $this->setName('cache:clear')
15  ->setDescription(elgg_echo('cli:cache:clear:description'));
16  }
17 
21  protected function command() {
23 
24  if (!$this->option('quiet')) {
25  $this->write(elgg_echo('admin:cache:cleared'));
26  }
27 
28  return self::SUCCESS;
29  }
30 }
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
write($messages, $level=LogLevel::INFO)
Write messages to output buffer.
Definition: BaseCommand.php:93
Abstract command with some utility methods.
Definition: Command.php:12
elgg-cli cache:clear
option($name)
Returns option value.
elgg_clear_caches()
Clear all the registered caches.
Definition: cache.php:103