Skip to content

Commit

Permalink
Update CacheClean
Browse files Browse the repository at this point in the history
  • Loading branch information
bcordis committed Oct 3, 2024
1 parent b0bf809 commit 011c0d5
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions admin/src/Controller/CwmassetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// No Direct Access
use CWM\Component\Proclaim\Administrator\Helper\Cwmhelper;
use CWM\Component\Proclaim\Administrator\Model\CwmassetsModel;
use Exception;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
Expand Down Expand Up @@ -55,7 +56,7 @@ class CwmassetsController extends BaseController
*
* @return void
*
* @throws \Exception
* @throws Exception
* @since 1.5
*/
public function execute($task): void
Expand All @@ -72,7 +73,7 @@ public function execute($task): void
*
* @return void
*
* @throws \Exception
* @throws Exception
* @since 8.0.0
*/
public function checkassets(): void
Expand All @@ -95,7 +96,7 @@ public function checkassets(): void
*
* @return void
*
* @throws \Exception
* @throws Exception
* @since 8.0.0
*/
public function browse(): void
Expand All @@ -108,8 +109,7 @@ public function browse(): void
$stack = $session->get('asset_stack', '', 'CWM');

if (empty($stack) || !is_array($stack)) {
Cwmhelper::clearcache('site');
Cwmhelper::clearcache('administrator');
Cwmhelper::clearCache();
$session->set('asset_stack', '', 'CWM');

$model = new CwmassetsModel();
Expand All @@ -128,7 +128,7 @@ public function browse(): void
*
* @return void
*
* @throws \Exception
* @throws Exception
* @since 8.0.0
*/
public function run(): void
Expand All @@ -150,16 +150,15 @@ public function run(): void
*
* @return void
*
* @throws \Exception
* @throws Exception
* @since 9.0.2
*/
public function clear(): void
{
// Check for request forgeries.
(Session::checkToken('get') || Session::checkToken()) or jexit(Text::_('JINVALID_TOKEN'));

Cwmhelper::clearcache('administrator');
Cwmhelper::clearcache('site');
Cwmhelper::clearCache();
$session = Factory::getApplication()->getSession();
$session->set('assat_stack', '', 'CWM');
$app = Factory::getApplication();
Expand Down

0 comments on commit 011c0d5

Please sign in to comment.