cache / branches / master / vendors / shells / cache.php

history
<?php 
/* SVN FILE: $Id$ */
/**
 * Cache Shell
 *
 * Long description for file
 *
 * PHP version 5
 *
 * Licensed under The MIT License
 *
 * @filesource
 * @package		  cache
 * @subpackage	  cache.shells
 * @version       $Revision$
 * @modifiedby    $LastChangedBy$
 * @lastmodified  $Date$
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */

/**
 * Imports
 **/
App::import('Core', 'Shell');

/**
 * Cache Shell
 *
 * @package cache
 * @subpackage cache.shells
 */
class CacheShell extends Shell {
	
/**
 * undocumented variable
 *
 * @var string
 */
	var $tasks = array('Clear', 'Show');
	

/**
 * Main shell execution
 *
 * @return void
 * @access public
 */
	function main() {
		if (empty($this->args) || count($this->args) > 1) {
			return $this->help();
		}	
	}
	
	
/**
 * Help for Cache shell
 *
 * @return void
 * @access public
 */
	function help() {
		$this->out(__("Cache Shell", true));
		$this->out("");
		$this->out(__("\tAllows you to perform list and clear operations on your application caches", true));
		$this->out("");
		$this->out(__("\tUsage:", true));
		$this->out(__("\t\tcake cache clear [-type views] [-ext ] all | [cache_name] [cache_name] ... ", true));
		$this->out(__("\t\tcake cache show  [-type name]"));
		$this->out("");
		$this->out(__("\tArguments:", true));
		$this->out(__("\t\tclear: \tIf called without [cache_name], clears entire view cache.", true));
		$this->out(__("\t\tshow: \tOutputs an alphanumerically ordered list of cache keys.", true));
		$this->out("");
		$this->hr();
		$this->out("");
	}
}
?>