<commit_before><?php
/**
 * Garp_Cli_Command_Cache
 * 
 * @author <NAME> | grrr.nl
 * @modifiedby $LastChangedBy: $
 * @version $Revision: $
 * @package Garp
 * @subpackage Cli
 * @lastmodified $Date: $
 */
class Garp_Cli_Command_Cache extends Garp_Cli_Command {
	/**
 	 * Clear all the cache
 	 * @param Array $args Tags.
 	 * @return Void
 	 */
	public function clear(array $args = array()) {
		$app = Zend_Registry::get('application');
		$bootstrap = $app->getBootstrap();
		$cacheDir = false;
		if ($bootstrap && $bootstrap->getResource('cachemanager')) {
			$cacheManager = $bootstrap->getResource('cachemanager');
			$cache = $cacheManager->getCache(Zend_Cache_Manager::PAGECACHE);
			$cacheDir = $cache->getBackend()->getOption('public_dir');
		}

		Garp_Cache_Manager::purgeStaticCache($args, $cacheDir);
		Garp_Cache_Manager::purgeMemcachedCache($args);
		Garp_Cache_Manager::purgePluginLoaderCache();
		Garp_Cli::lineOut('All cache purged.');
	}


	/**
 	 * Help
 	 */
	public function help() {
		Garp_Cli::lineOut('Usage:');
		Garp_Cli::lineOut('Clear all cache:');
		Garp_Cli::lineOut('  g Cache clear');
		Garp_Cli::lineOut('');
		Garp_Cli::lineOut('Clear cache of model Foo and model Bar:');
		Garp_Cli::lineOut('  g Cache clear Model_Foo Model_Bar');
		Garp_Cli::lineOut('');
	}
}<commit_msg>Added color to help output.<commit_after><?php
/**
 * Garp_Cli_Command_Cache
 * 
 * @author <NAME> | grrr.nl
 * @modifiedby $LastChangedBy: $
 * @version $Revision: $
 * @package Garp
 * @subpackage Cli
 * @lastmodified $Date: $
 */
class Garp_Cli_Command_Cache extends Garp_Cli_Command {
	/**
 	 * Clear all the cache
 	 * @param Array $args Tags.
 	 * @return Boolean
 	 */
	public function clear(array $args = array()) {
		$app = Zend_Registry::get('application');
		$bootstrap = $app->getBootstrap();
		$cacheDir = false;
		if ($bootstrap && $bootstrap->getResource('cachemanager')) {
			$cacheManager = $bootstrap->getResource('cachemanager');
			$cache = $cacheManager->getCache(Zend_Cache_Manager::PAGECACHE);
			$cacheDir = $cache->getBackend()->getOption('public_dir');
		}

		Garp_Cache_Manager::purgeStaticCache($args, $cacheDir);
		Garp_Cache_Manager::purgeMemcachedCache($args);
		Garp_Cache_Manager::purgePluginLoaderCache();
		Garp_Cli::lineOut('All cache purged.');
		return true;
	}


	/**
 	 * Help
 	 */
	public function help() {
		Garp_Cli::lineOut('Usage:');
		Garp_Cli::lineOut('Clear all cache:');
		Garp_Cli::lineOut('  g Cache clear', Garp_Cli::BLUE);
		Garp_Cli::lineOut('');
		Garp_Cli::lineOut('Clear cache of model Foo and model Bar:');
		Garp_Cli::lineOut('  g Cache clear Model_Foo Model_Bar', Garp_Cli::BLUE);
		Garp_Cli::lineOut('');
		return true;
	}
}
{'fraction_non_alphanumeric': 0.1637578908280728, 'fraction_numerical': 0.0, 'mean_word_length': 5.013392857142857, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '1989424', 'n_tokens_mistral': 1020, 'n_tokens_neox': 929, 'n_words': 178}