作者 景龙
1 个管道 的构建 通过 耗费 2 秒

关闭首页缓存

@@ -22,16 +22,16 @@ class IndexController extends HomeBaseController @@ -22,16 +22,16 @@ class IndexController extends HomeBaseController
22 //统计访问量 22 //统计访问量
23 $serverModel->statistics(); 23 $serverModel->statistics();
24 //banner轮播图 24 //banner轮播图
25 - $coverImg = cache('coverImg');  
26 - if(!$coverImg){ 25 +// $coverImg = cache('coverImg');
  26 +// if(!$coverImg){
27 $coverImg = $this->getCoverImg(CityCategoryModel::indexImg,3); 27 $coverImg = $this->getCoverImg(CityCategoryModel::indexImg,3);
28 - cache('coverImg',$coverImg);  
29 - } 28 +// cache('coverImg',$coverImg);
  29 +// }
30 $this->assign('coverImg',$coverImg); 30 $this->assign('coverImg',$coverImg);
31 31
32 //星球奇境,城市分类 32 //星球奇境,城市分类
33 - $city = cache('res_city');  
34 - if(!$city){ 33 +// $city = cache('res_city');
  34 +// if(!$city){
35 $city[1]['id'] = CityCategoryModel::asia; 35 $city[1]['id'] = CityCategoryModel::asia;
36 $city[2]['id'] = CityCategoryModel::europe; 36 $city[2]['id'] = CityCategoryModel::europe;
37 $city[3]['id'] = CityCategoryModel::africa; 37 $city[3]['id'] = CityCategoryModel::africa;
@@ -52,13 +52,13 @@ class IndexController extends HomeBaseController @@ -52,13 +52,13 @@ class IndexController extends HomeBaseController
52 } 52 }
53 } 53 }
54 } 54 }
55 - cache('res_city', $city);  
56 - } 55 +// cache('res_city', $city);
  56 +// }
57 $this->assign('res_city',$city); 57 $this->assign('res_city',$city);
58 58
59 //星享体验 59 //星享体验
60 - $month = cache('res_month');  
61 - if(!$month){ 60 +// $month = cache('res_month');
  61 +// if(!$month){
62 $res_month = $this->getMonthArticle(); 62 $res_month = $this->getMonthArticle();
63 $month = []; 63 $month = [];
64 foreach($res_month['data'] as &$value){ 64 foreach($res_month['data'] as &$value){
@@ -72,8 +72,8 @@ class IndexController extends HomeBaseController @@ -72,8 +72,8 @@ class IndexController extends HomeBaseController
72 } 72 }
73 } 73 }
74 } 74 }
75 - cache('res_month', $month);  
76 - } 75 +// cache('res_month', $month);
  76 +// }
77 $this->assign('res_month',$month); 77 $this->assign('res_month',$month);
78 78
79 //星域秀场->星球影院 79 //星域秀场->星球影院
@@ -113,27 +113,27 @@ class IndexController extends HomeBaseController @@ -113,27 +113,27 @@ class IndexController extends HomeBaseController
113 113
114 114
115 //星域秀场->明星访谈 115 //星域秀场->明星访谈
116 - $res_mxft = cache('res_mxft');  
117 - if(!$res_mxft){ 116 +// $res_mxft = cache('res_mxft');
  117 +// if(!$res_mxft){
118 $position = CityCategoryModel::mxft; 118 $position = CityCategoryModel::mxft;
119 $field = 'id,full_name,position,trade,post_excerpt,thumbnail avatar'; 119 $field = 'id,full_name,position,trade,post_excerpt,thumbnail avatar';
120 $res_mxft = $this->getChildArticle($position,$field,1); 120 $res_mxft = $this->getChildArticle($position,$field,1);
121 if($res_mxft){ 121 if($res_mxft){
122 $res_mxft = $res_mxft[0]; 122 $res_mxft = $res_mxft[0];
123 } 123 }
124 - cache('res_mxft',$res_mxft);  
125 - } 124 +// cache('res_mxft',$res_mxft);
  125 +// }
126 $this->assign('res_mxft',$res_mxft); 126 $this->assign('res_mxft',$res_mxft);
127 127
128 128
129 //星域秀场->星域画廊 129 //星域秀场->星域画廊
130 - $res_xyhl = cache('res_xyhl');  
131 - if(!$res_xyhl){ 130 +// $res_xyhl = cache('res_xyhl');
  131 +// if(!$res_xyhl){
132 $position = CityCategoryModel::xyhl; 132 $position = CityCategoryModel::xyhl;
133 $field = 'id,thumbnail'; 133 $field = 'id,thumbnail';
134 $res_xyhl = $this->getChildArticle($position,$field,16); 134 $res_xyhl = $this->getChildArticle($position,$field,16);
135 - cache('res_xyhl',$res_xyhl);  
136 - } 135 +// cache('res_xyhl',$res_xyhl);
  136 +// }
137 $this->assign('res_xyhl',$res_xyhl); 137 $this->assign('res_xyhl',$res_xyhl);
138 138
139 139
@@ -149,13 +149,13 @@ class IndexController extends HomeBaseController @@ -149,13 +149,13 @@ class IndexController extends HomeBaseController
149 149
150 150
151 //星际活动 151 //星际活动
152 - $res_xjhd = cache('res_xjhd');  
153 - if(!$res_xjhd){ 152 +// $res_xjhd = cache('res_xjhd');
  153 +// if(!$res_xjhd){
154 $position = CityCategoryModel::xjhd; 154 $position = CityCategoryModel::xjhd;
155 $field = 'id,post_title,thumbnail'; 155 $field = 'id,post_title,thumbnail';
156 $res_xjhd = $this->getParentArticle($position,$field,2); 156 $res_xjhd = $this->getParentArticle($position,$field,2);
157 - cache('res_xjhd',$res_xjhd);  
158 - } 157 +// cache('res_xjhd',$res_xjhd);
  158 +// }
159 $this->assign('res_xjhd',$res_xjhd); 159 $this->assign('res_xjhd',$res_xjhd);
160 return $this->fetch(); 160 return $this->fetch();
161 } 161 }