wesmiler 5 years ago
parent
commit
cbbfca0d4f
4 changed files with 7 additions and 3 deletions
  1. 1 1
      app/index/controller/Top10Controller.php
  2. 4 1
      data/config/app.php
  3. 1 1
      data/config/config.php
  4. 1 0
      开发说明.md

+ 1 - 1
app/index/controller/Top10Controller.php

@@ -12,7 +12,7 @@ class Top10Controller extends HomeBaseController
         $cacheKey = "cache_top_pages:index";
         $pageHtml = RedisService::get($cacheKey);
         if($pageHtml){
-            return $pageHtml;
+//            return $pageHtml;
         }
 
         $areaList = config('params.areaList');

+ 4 - 1
data/config/app.php

@@ -3,7 +3,10 @@ return [
     // 默认模块名
     'default_module'         => 'index',
     'exception_handle'         => '\\app\\index\\exception\\Http',
-
+    'html_cache_on' => true, // 开启静态缓存
+    'html_cache_time' => 7200, // 全局静态缓存有效期(秒)
+    'html_file_suffix' => '.shtml', // 设置静态缓存文件后缀
+    'html_cache_compile_type' => 'file',//缓存存储驱动
     
 ];
 

+ 1 - 1
data/config/config.php

@@ -21,7 +21,7 @@ return [
         // 数据库索引
         'select' => 1,
         // 超时
-        'timeout' => 60,
+        'timeout' => 120,
         // 有效期
 //        'expire' => 0,
 

+ 1 - 0
开发说明.md

@@ -0,0 +1 @@
+#