diff --git a/Mage/Task/BuiltIn/Magento/ClearCacheTask.php b/Mage/Task/BuiltIn/Magento/ClearCacheTask.php new file mode 100644 index 0000000..3d5f372 --- /dev/null +++ b/Mage/Task/BuiltIn/Magento/ClearCacheTask.php @@ -0,0 +1,44 @@ + +* +* For the full copyright and license information, please view the LICENSE +* file that was distributed with this source code. +*/ + +namespace Mage\Task\BuiltIn\Magento; + +use Mage\Task\AbstractTask; + +use Exception; + +/** + * Task for Clearing Cache + * + * @author Oscar Reales + */ +class ClearCacheTask extends AbstractTask +{ + /** + * (non-PHPdoc) + * @see \Mage\Task\AbstractTask::getName() + */ + public function getName() + { + return 'Magento - Clean Cache [built-in]'; + } + + /** + * Clears Cache + * @see \Mage\Task\AbstractTask::run() + */ + public function run() + { + $command = 'rm -rf var/cache/*'; + $result = $this->runCommandLocal($command); + + return $result; + } +} \ No newline at end of file diff --git a/Mage/Task/BuiltIn/Magento/ClearFullPageCacheTask.php b/Mage/Task/BuiltIn/Magento/ClearFullPageCacheTask.php new file mode 100644 index 0000000..a1c8f8b --- /dev/null +++ b/Mage/Task/BuiltIn/Magento/ClearFullPageCacheTask.php @@ -0,0 +1,44 @@ + +* +* For the full copyright and license information, please view the LICENSE +* file that was distributed with this source code. +*/ + +namespace Mage\Task\BuiltIn\Magento; + +use Mage\Task\AbstractTask; + +use Exception; + +/** + * Task for Clearing Full Page Cache + * + * @author Oscar Reales + */ +class ClearFullPageCacheTask extends AbstractTask +{ + /** + * (non-PHPdoc) + * @see \Mage\Task\AbstractTask::getName() + */ + public function getName() + { + return 'Magento - Clean Full Page Cache [built-in]'; + } + + /** + * Clears Full Page Cache + * @see \Mage\Task\AbstractTask::run() + */ + public function run() + { + $command = 'rm -rf var/full_page_cache/*'; + $result = $this->runCommandLocal($command); + + return $result; + } +} \ No newline at end of file