文件缓存 无法读取数据吗?

浏览:708 发布日期:2016/09/03 分类:求助交流 关键字: S缓存文件,读取不了数据
public function publicNotif ($url) {

$data = [
'title' => $res[0]['title'],
'content' => $res[0]['content'],
'start_time' => $res[0]['start_time'],
'promulgator' => $res[0]['promulgator'],
];

S(md5($url), $data, array('type'=>'file','length'=>100,'expire'=>60));

$res_data = S(md5($url));

return $res_data;

}

将$data里的数据以文件的形式进行缓存
在下面的方法里读取数据 为什么读取不到呢??
public function notif () {

$res_cache_data = S(md5($url));

if ($res_cache_data) {
$res = $res_cache_data;
} else {
$res = $this->publicNotif($url);

}


}
最佳答案
评论( 相关
后面还有条评论,点击查看>>