修改商品分类缓存
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user