log = Logger::getLogger(__CLASS__); $this->log->info("Calling scripts to refresh Cache...."); $this->log->info("Script Mode:".$action); if ($action=='refreshNums') {$this->refreshNums();} else if ($action=='refreshCharts') {$this->refreshCharts();} else if ($action=='refreshAll') { $this->refreshAll(); } else if ($action=='help') { $this->log->info("Availiable options: refreshNums-> Refreshes Stats Numbers Only; refreshCharts -> Refresh Chart Queries ; refreshAll-> Refresh every entry in the cache."); } else { $this->log->info("Wrong argument given. Availiable are: refreshNums, refreshCharts , refreshAll.");} } public function refreshNums(){ $this->log->info("Refreshing Numbers..."); $csn = new ComputeStatsNumbers(); $csn->computeStats(); $this->log->info("Done!"); } public function refreshCharts() { $this->log->info("Refreshing Charts..."); $csn = new RefreshCharts();$csn->refresh(); $this->log->info("Done!"); } public function refreshAll() { $this->refreshNums(); $this->refreshCharts();} } if ($_GET) { $argument1 = $_GET['action']; } else { $argument1 = $argv[1]; } $rc = new RefreshCache($argument1); ?>