|
|
@@ -22,9 +22,9 @@ class ExtensionWuLiuEntity extends BaseEntity
|
|
|
return $entity->toArray();
|
|
|
}
|
|
|
// 一个人一天最多查询100次
|
|
|
- $cacheKey = 'wuliu_' . date('Ymd') . '_' . $userID;
|
|
|
- $times = Cache::remember($cacheKey, function () use ($cacheKey) {
|
|
|
- return Cache::get($cacheKey, 0) + 1;
|
|
|
+ $name = 'wuliu_' . date('Ymd') . '_' . $userID;
|
|
|
+ $times = Cache::remember($name, function () use ($name) {
|
|
|
+ return Cache::get($name, 0) + 1;
|
|
|
}, 86400);
|
|
|
if ($times > 100) {
|
|
|
throw_logic_exception('查询太过频繁,请明天再试');
|