Authored by hf

modify guang page to remove cache

... ... @@ -293,7 +293,7 @@ class Yohobuy
/* 开启缓存的情况 */
if ($cache && USE_CACHE) {
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if (empty($result)) {
if (empty($result[$name])) {
$result = Cache::get($key, 'slave');
}
// 接口调用成功时,这里会设置一级(master)和二级(slave)的缓存数据.
... ...
... ... @@ -45,12 +45,13 @@ class DetailData
// 先尝试获取二级缓存(slave), 有数据则直接返回.
$cached = Cache::get($key, 'master');
if (!empty($cached)) {
Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType), false, 1000);
return $cached;
}
}
// 获取资讯
$article = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType), false, 1000);
$article = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_PACKAGE_ARTICLE, 'getArticle', array($id, $clientType), false);
if (!isset($article['author_id'])) {
return $result;
}
... ...
... ... @@ -66,7 +66,7 @@ class ListData
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_ARTICLELIST, $param, 1800); // 缓存30分钟
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_ARTICLELIST, $param);
}
/**
... ...