智眸token缓存优化

This commit is contained in:
sdy 2026-06-17 17:09:27 +08:00
parent 1591170585
commit f2e69091f0
1 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ public class ZhiMouServiceImpl implements ZhiMouService {
@Override
public ZhiMouInfo getToken() {
Object tokenObj = CacheUtils.get(BusinessConstant.ZHIMOU_TOKEN);
Object tokenObj = CacheUtils.getWithoutReset(BusinessConstant.ZHIMOU_TOKEN);
if (tokenObj instanceof ZhiMouInfo) {
return (ZhiMouInfo) tokenObj;
}
@ -155,8 +155,8 @@ public class ZhiMouServiceImpl implements ZhiMouService {
info.setUrl(url);
info.setToken(result.getJSONObject("data").getString("token"));
info.setExpire(result.getJSONObject("data").getLong("expires_at"));
//官方说过期2小时这里设置1小时缓存
CacheUtils.set(BusinessConstant.ZHIMOU_TOKEN, info);
//官方说过期2小时这里设置小时缓存
CacheUtils.set(BusinessConstant.ZHIMOU_TOKEN, info, 30 * 60 * 1000);
return info;
}