feat(微服务治理工具): 优化Sentinel免登录逻辑
Sentinel登录状态默认30分钟失效,将Sentinel Token缓存过期时间调整为28分钟 Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
parent
4c8be09a72
commit
e40d58ae9d
|
@ -90,7 +90,8 @@ public class ThirdPartyToolServiceImpl implements ThirdPartyToolService {
|
|||
Map<String, Collection<String>> header = response.headers();
|
||||
if (header != null && header.containsKey("set-cookie")) {
|
||||
sentinelCookie = header.get("set-cookie").iterator().next();
|
||||
redisService.setCacheObject(CacheConstants.SENTINEL_TOKEN, sentinelCookie, 12L, TimeUnit.HOURS);
|
||||
//Sentinel登录状态默认30分钟失效,将Sentinel Token缓存过期时间调整为28分钟
|
||||
redisService.setCacheObject(CacheConstants.SENTINEL_TOKEN, sentinelCookie, 28L, TimeUnit.MINUTES);
|
||||
}
|
||||
} catch (TimeoutException e) {
|
||||
log.error("获取Sentinel Token超时");
|
||||
|
|
Loading…
Reference in New Issue