Browse Source

商品列表暂时去掉缓存,还需加回来

lizhen_gitee 4 months ago
parent
commit
922e52cecc
1 changed files with 3 additions and 3 deletions
  1. 3 3
      addons/shopro/service/goods/GoodsService.php

+ 3 - 3
addons/shopro/service/goods/GoodsService.php

@@ -217,7 +217,7 @@ class GoodsService
         $this->order();
 
         $goods = $this->query->field('*,(sales + show_sales) as total_sales')
-                    ->cache($this->getCacheKey($is_cache), (200 + mt_rand(0, 100)))
+//                    ->cache($this->getCacheKey($is_cache), (200 + mt_rand(0, 100)))
                     ->select();
 
         // 格式化数据
@@ -240,7 +240,7 @@ class GoodsService
         $this->order();
 
         $goods = $this->query->field('id,image,title,price as pricemin,is_sku,status,type,dispatch_type')
-                    ->cache($this->getCacheKey($is_cache), (200 + mt_rand(0, 100)))
+//                    ->cache($this->getCacheKey($is_cache), (200 + mt_rand(0, 100)))
                     ->autopage()
                     ->select();
 
@@ -272,7 +272,7 @@ class GoodsService
         $this->order();
 
         $goods = $this->query->field('*,(sales + show_sales) as total_sales')
-                    ->cache($this->getCacheKey($is_cache), (200 + mt_rand(0, 100)))
+//                    ->cache($this->getCacheKey($is_cache), (200 + mt_rand(0, 100)))
                     ->paginate(request()->param('list_rows', 10));
 
         // 格式化数据