cache

ELFPHP

	function notice(){
		$cache=new \Elf\Cache();
		$values=$cache->get($_SERVER['REQUEST_URI']);
		if($values==false){
		
		//do something like this
			$n=D("notice");
			$notice=$n->where(array("id"=>$_GET["id"], "display"=>'1'))->find();
			$this->assign("notice", $notice);
		//end do something
		
			$this->show($cache);
		}else{
			echo $values;
		}
	}
		
	description
		this is standard and classic example of using cache in elfphp