log = Logger::getLogger(__CLASS__); Logger::configure('./js/log4php/log4php.xml'); if(class_exists("Predis\Client")){ try { //todo changed timeout from 0 to -1 $this->cache = new Predis\Client(array("scheme" => $redis_scheme,"host" => $redis_host,"port" => $redis_port,"read_write_timeout" => -1)); $this->log->info("redis host: ".$redis_host." and redis port: ".$redis_port); } catch(Exception $e) { $this->log->error("Error connecting to Redis server: ".$e->getMessage()); $this->cache = null; } } else{ $this->log->info("cache does not exist"); //predis exit;} } public function replace() { $shadowKeys=$this->cache->hkeys('SHADOW_STATS_NUMBERS'); $this->log->info("moving shadow values to public for Stat Numbers..."); for($x=0;$xcache->hget('SHADOW_STATS_NUMBERS',$key); $this->cache->hset('STATS_NUMBERS',$key,$value); } $this->log->info("All Shadow Entries Promoted Sucessfully!"); $this->cache->quit(); } } ?>