Skip to content

Commit

Permalink
Only clean the cache once, not per job
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed Dec 28, 2023
1 parent 10272f9 commit ec02491
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Controller/Adminhtml/Config/Job/MassDisableJobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public function execute()
$path = $this->helper->constructFrequencyPath($jobCode);
// Empty frequency disables the job
$this->helper->saveJobFrequencyConfig($path, '');
// Clear the config cache
$this->cache->clean([ConfigCache::CACHE_TAG]);
}

// Clear the config cache
$this->cache->clean([ConfigCache::CACHE_TAG]);
} catch (Exception $e) {
$this->getMessageManager()->addErrorMessage($e->getMessage());
$this->_redirect('*/config/index/');
Expand Down

0 comments on commit ec02491

Please sign in to comment.