|
@@ -192,6 +192,10 @@ class CmsContentTemplateSetRepository
|
|
|
$group_array['apply_type'] = "exchangeMall";
|
|
|
$group_array['title'] = $temalates->title;
|
|
|
$group_array['content'] = [];
|
|
|
+ $exchange_key = config('constants.CMS_EXCHANGE');
|
|
|
+ if (Cache::has($exchange_key)) {
|
|
|
+ return Cache::store('redis')->get($exchange_key);
|
|
|
+ }
|
|
|
|
|
|
$banner_rule = $this->cmsContentTemplateSet->select('id', 'rule')->where(['tpl_id' => $temalates->id, 'area_type' => 0, 'status' => 1])->limit(1)->first();
|
|
|
$new_rule = [];
|
|
@@ -261,6 +265,10 @@ class CmsContentTemplateSetRepository
|
|
|
$group_array['content'][$count + $key + 1]['rule'] = $val['rule'];
|
|
|
}
|
|
|
|
|
|
+ if (!Cache::has($exchange_key)) {
|
|
|
+ Cache::store('redis')->put($exchange_key, $group_array, 600);//10分钟过期
|
|
|
+ }
|
|
|
+
|
|
|
return $group_array;
|
|
|
}
|
|
|
|