|
@@ -35,12 +35,12 @@ class Menu extends BaseModel
|
|
|
{
|
|
|
|
|
|
$data = json_encode([ $condition, $field, $order, $limit ]);
|
|
|
-// $cache = Cache::get("getMenuList_" . $data);
|
|
|
-// if (!empty($cache)) {
|
|
|
-// return $this->success($cache);
|
|
|
-// }
|
|
|
+ $cache = Cache::get("getMenuList_" . $data);
|
|
|
+ if (!empty($cache)) {
|
|
|
+ return $this->success($cache);
|
|
|
+ }
|
|
|
$list = model('menu')->getList($condition, $field, $order, '', '', '', $limit);
|
|
|
-// Cache::tag("menu")->set("getMenuList_" . $data, $list);
|
|
|
+ Cache::tag("menu")->set("getMenuList_" . $data, $list);
|
|
|
|
|
|
return $this->success($list);
|
|
|
}
|