From: Tim Düsterhus Date: Wed, 10 Aug 2022 10:17:16 +0000 (+0200) Subject: Use ClearCacheCommand in CacheClearAction X-Git-Tag: 6.0.0_Alpha_1~1046^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=10ea1b17733d86279f315844f560ed15a5de0992;p=GitHub%2FWoltLab%2FWCF.git Use ClearCacheCommand in CacheClearAction --- 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();