dever 6 years ago
parent
commit
3048700eaa
1 changed files with 9 additions and 0 deletions
  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;
     }