Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/admin/cli/purge_caches.php
Go to the documentation of this file.
00001 <?php
00002 // This file is part of Moodle - http://moodle.org/
00003 //
00004 // Moodle is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // Moodle is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00016 
00024 define('CLI_SCRIPT', true);
00025 
00026 require(dirname(dirname(dirname(__FILE__))).'/config.php');
00027 require_once($CFG->libdir.'/clilib.php');
00028 
00029 list($options, $unrecognized) = cli_get_params(array('help' => false), array('h' => 'help'));
00030 
00031 if ($unrecognized) {
00032     $unrecognized = implode("\n  ", $unrecognized);
00033     cli_error(get_string('cliunknowoption', 'admin', $unrecognized), 2);
00034 }
00035 
00036 if ($options['help']) {
00037     $help =
00038 "Invalidates all Moodle internal caches
00039 
00040 Options:
00041 -h, --help            Print out this help
00042 
00043 Example:
00044 \$sudo -u www-data /usr/bin/php admin/cli/purge_caches.php
00045 ";
00046 
00047     echo $help;
00048     exit(0);
00049 }
00050 
00051 purge_all_caches();
00052 
00053 exit(0);
 All Data Structures Namespaces Files Functions Variables Enumerations