<commit_before><?
defined('C5_EXECUTE') or die("Access Denied.");

class DashboardSystemOptimizationClearCacheController extends DashboardBaseController {
	
	public $helpers = array('form'); 
	
	public function view(){
	}
	
	public function do_clear() {
		if ($this->token->validate("clear_cache")) {
			if ($this->isPost()) {
				if (Cache::flush()) {
					$this->redirect('/dashboard/system/optimization/clear_cache', 'cache_cleared');
				}
			}
		} else {
			$this->set('error', array($this->token->getErrorMessage()));
		}
	}

	public function cache_cleared() {
		$this->set('message', t('Cached files removed.'));	
		$this->view();
	}
	
	
}<commit_msg>bug fix to clear cache when cache is disabled<commit_after><?
defined('C5_EXECUTE') or die("Access Denied.");

class DashboardSystemOptimizationClearCacheController extends DashboardBaseController {
	
	public $helpers = array('form'); 
	
	public function view(){
	}
	
	public function do_clear() {
		if ($this->token->validate("clear_cache")) {
			if ($this->isPost()) {
				Cache::flush();
				$this->redirect('/dashboard/system/optimization/clear_cache', 'cache_cleared');
			}
		} else {
			$this->set('error', array($this->token->getErrorMessage()));
		}
	}

	public function cache_cleared() {
		$this->set('message', t('Cached files removed.'));	
		$this->view();
	}
	
	
}
{'fraction_non_alphanumeric': 0.17902621722846443, 'fraction_numerical': 0.00149812734082397, 'mean_word_length': 4.54356846473029, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6080078', 'n_tokens_mistral': 473, 'n_tokens_neox': 419, 'n_words': 81}