dever 6 年之前
父節點
當前提交
3048700eaa
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      main/src/Journal.php

+ 9 - 0
main/src/Journal.php

@@ -56,6 +56,13 @@ class Journal extends Core
     # 根据分类获取小刊列表
     public function getList()
     {
+        $key = 'journal_list_' . Dever::input('system');
+        $data = Dever::cache($key);
+
+        if ($data) {
+            return $data;
+        }
+
         $cate = $this->getCate();
 
         $time = time();
@@ -97,6 +104,8 @@ class Journal extends Core
             $this->data['journal'] = array();
         }
 
+        Dever::cache($key, $this->data);
+
         return $this->data;
     }