do add clear brand page cache
Showing
3 changed files
with
8 additions
and
3 deletions
@@ -214,7 +214,7 @@ class Yohobuy | @@ -214,7 +214,7 @@ class Yohobuy | ||
214 | { | 214 | { |
215 | /* 开启缓存的情况 */ | 215 | /* 开启缓存的情况 */ |
216 | if ($cache && USE_CACHE) { | 216 | if ($cache && USE_CACHE) { |
217 | - $key = md5(implode(',', array_values($urlList))); | 217 | + $key = md5(implode(',', array_values($urlList))); |
218 | // 先尝试获取一级缓存(master), 有数据则直接返回. | 218 | // 先尝试获取一级缓存(master), 有数据则直接返回. |
219 | $result = Cache::get($key, 'master'); | 219 | $result = Cache::get($key, 'master'); |
220 | if (!empty($result)) { | 220 | if (!empty($result)) { |
@@ -45,7 +45,7 @@ class BrandData | @@ -45,7 +45,7 @@ class BrandData | ||
45 | $param['method'] = 'app.brand.brandlist'; | 45 | $param['method'] = 'app.brand.brandlist'; |
46 | $param['yh_channel'] = $channel; | 46 | $param['yh_channel'] = $channel; |
47 | $param['client_secret'] = Sign::getSign($param); | 47 | $param['client_secret'] = Sign::getSign($param); |
48 | - $urlList['brandList'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param); | 48 | + $urlList['brandList'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param); |
49 | 49 | ||
50 | return Yohobuy::getMulti($urlList, array(), 3600); // 有缓存1小时 | 50 | return Yohobuy::getMulti($urlList, array(), 3600); // 有缓存1小时 |
51 | } | 51 | } |
@@ -289,7 +289,12 @@ class IndexController extends AbstractAction | @@ -289,7 +289,12 @@ class IndexController extends AbstractAction | ||
289 | case 'bgimg': | 289 | case 'bgimg': |
290 | Cache::delete(CacheConfig::KEY_ACTION_INDEX_INDEX); | 290 | Cache::delete(CacheConfig::KEY_ACTION_INDEX_INDEX); |
291 | break; | 291 | break; |
292 | - | 292 | + case 'brands': |
293 | + Cache::delete('3206a153b0cebbd6e47be90c6ac41ee8'); | ||
294 | + Cache::delete('1c6bb62c480aec413b247d6f21e9c23a'); | ||
295 | + Cache::delete('60bb7899f49b3549dde438ac53526dea'); | ||
296 | + Cache::delete('9085ba21ac3d4f849c977da37a290a23'); | ||
297 | + break; | ||
293 | } | 298 | } |
294 | } | 299 | } |
295 | 300 |
-
Please register or login to post a comment