Kaynağa Gözat

去掉缓存

liugc 1 yıl önce
ebeveyn
işleme
326b0dd163
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      app/adminapi/logic/auth/MenuLogic.php

+ 2 - 2
app/adminapi/logic/auth/MenuLogic.php

@@ -44,7 +44,7 @@ class MenuLogic extends BaseLogic
     public static function getMenuByAdminId($adminId)
     {
         // 缓存优化
-        //$data = cache('MenuLogic:getMenuByAdminId');
+        //$data = cache('MenuLogic:getMenuByAdminId:'.$adminId);
         //if(empty($data)){
             $admin = Admin::findOrEmpty($adminId);
             $where = [];
@@ -58,7 +58,7 @@ class MenuLogic extends BaseLogic
                 ->order(['sort' => 'desc', 'id' => 'asc'])
                 ->select();
             $data = linear_to_tree($menu, 'children');
-            //cache('MenuLogic:getMenuByAdminId',$data);
+            //cache('MenuLogic:getMenuByAdminId:'.$adminId,$data);
         //}
         return $data;
     }