diff --git a/CHANGELOG.md b/CHANGELOG.md index ae84cc3597943ae266ea6e332f741ab3bc4157c5..06cd5f970c05e60bf7e58f964e04477f0b154413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API' ### New APIs * It is now easier to generate the URL for a menu item see [#6140](https://github.com/piwik/piwik/issues/6140), [urlForDefaultAction()](http://developer.piwik.org/api-reference/Piwik/Plugin/Menu#urlfordefaultaction), [urlForAction()](http://developer.piwik.org/api-reference/Piwik/Plugin/Menu#urlforaction), [urlForModuleAction()](http://developer.piwik.org/api-reference/Piwik/Plugin/Menu#urlformoduleaction) +### New commands +* `core:clear-caches` Lets you easily delete all caches. This command can be useful for instance after updating Piwik files manually. + ## Piwik 2.6.0 @@ -75,7 +78,7 @@ We are using `@since` annotations in case we are introducing new API's to make i * [MenuUser](http://developer.piwik.org/api-reference/Piwik/Menu/MenuUser) to add or modify user menu items * [Tasks](http://developer.piwik.org/api-reference/Piwik/Plugin/Tasks) to add scheduled tasks -### New commmands +### New commands * `generate:theme` Let's you easily generate a new theme and customize colors, see the [Theming guide](http://developer.piwik.org/guides/theming) * `generate:update` Let's you generate an update file * `generate:report` Let's you generate a report @@ -93,7 +96,7 @@ We are using `@since` annotations in case we are introducing new API's to make i ### Deprecations ### New features ### New APIs -### New commmands +### New commands ### New guides ### Internal change --> diff --git a/plugins/CoreConsole/Commands/ClearCaches.php b/plugins/CoreConsole/Commands/ClearCaches.php new file mode 100644 index 0000000000000000000000000000000000000000..cb199c854560e7183665df7fb7ad31e1171e536d --- /dev/null +++ b/plugins/CoreConsole/Commands/ClearCaches.php @@ -0,0 +1,37 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Plugins\CoreConsole\Commands; + +use Piwik\Filesystem; +use Piwik\Plugin\ConsoleCommand; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; + +/** + */ +class ClearCaches extends ConsoleCommand +{ + protected function configure() + { + $this->setName('core:clear-caches'); + $this->setDescription('Deletes all caches. This command can be useful for instance after updating Piwik files manually.'); + } + + /** + * Execute command like: ./console core:clear-caches + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + Filesystem::deleteAllCacheOnUpdate(); + + $this->writeSuccessMessage($output, array('Caches cleared')); + } +}