From 10ea1b17733d86279f315844f560ed15a5de0992 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 10 Aug 2022 12:17:16 +0200 Subject: [PATCH] Use ClearCacheCommand in CacheClearAction --- .../lib/acp/action/CacheClearAction.class.php | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php b/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php index 038f9c3ac0..28a2200580 100644 --- a/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php @@ -6,17 +6,14 @@ use Laminas\Diactoros\Response\EmptyResponse; use Laminas\Diactoros\Response\RedirectResponse; use wcf\acp\page\CacheListPage; use wcf\action\AbstractAction; -use wcf\data\package\update\server\PackageUpdateServer; -use wcf\system\cache\CacheHandler; -use wcf\system\language\LanguageFactory; +use wcf\system\cache\command\ClearCache; use wcf\system\request\LinkHandler; -use wcf\system\style\StyleHandler; /** * Clears the cache. * * @author Tim Duesterhus - * @copyright 2001-2019 WoltLab GmbH + * @copyright 2001-2022 WoltLab GmbH * @license GNU Lesser General Public License * @package WoltLabSuite\Core\Acp\Action */ @@ -34,17 +31,8 @@ class CacheClearAction extends AbstractAction { parent::execute(); - // reset stylesheets - StyleHandler::resetStylesheets(); - - // delete language cache and compiled templates as well - LanguageFactory::getInstance()->deleteLanguageCache(); - - // get package dirs - CacheHandler::getInstance()->flushAll(); - - // reset package update servers and the package cache - PackageUpdateServer::resetAll(); + $command = new ClearCache(); + $command(); $this->executed(); -- 2.20.1