修改商品分类缓存

This commit is contained in:
2026-01-07 10:31:16 +08:00
parent 14016c4144
commit c1220e7b8f

View File

@@ -32,7 +32,8 @@ class GoodsCategoryLogic{
* @author: 2021/3/6 18:49 * @author: 2021/3/6 18:49
*/ */
public static function categoryThirdTree($client,$type){ public static function categoryThirdTree($client,$type){
$cache = Cache::get('goods_category_'.$client); $cache_key = 'goods_category_'.$client.'_'.$type;
$cache = Cache::get($cache_key);
if ($cache) { if ($cache) {
return $cache; return $cache;
} }
@@ -136,7 +137,7 @@ class GoodsCategoryLogic{
} }
} }
Cache::set('goods_category_'.$client, array_values($lists)); Cache::set($cache_key, array_values($lists));
return array_values($lists); return array_values($lists);
} }