用了它以后,即使下次查询参数不同,也会显示上次查询结果,那么cache有什么用?
代码如下:
$a = CG::where('id',103)->cache('category')->find();
dump($a->toArray());
$a = CG::where('id',104)->cache('category')->find();
dump($a->toArray());打印如下^ array:8 [▼
"id" => 103
"title" => "大学段"
"pid" => 0
"status" => 1
"paixu" => 3
"delete_time" => null
"isupdate" => 0
"beizhu" => null
]
^ array:8 [▼
"id" => 103
"title" => "大学段"
"pid" => 0
"status" => 1
"paixu" => 3
"delete_time" => null
"isupdate" => 0
"beizhu" => null
]
^ "aa" 最佳答案