public function train_surp(){
$cache=Cache::get('train_surp');
if($cache){
$this->assign('list',unserialize($cache));
}
else{
$retult=train::paginate(5);
Cache::set('train_surp',$retult,10);
$list=Cache::get('train_surp');
$this->assign('list',$list);
}
return $this->fetch();
}
if($cache){$cache in
should be the object type
if (this is a Boolean value judgment that cannot determine the object type)
I don’t see what you are asking specifically?