【7.1.4】修复登录用户缓存类型

pull/22/head
fengshuonan 2021-10-01 15:44:00 +08:00
parent 7d7e30d63e
commit a4b9056d85
1 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ public class GunsAuthAutoConfiguration {
*/
@Bean
@ConditionalOnMissingBean(name = "loginUserCache")
public MemoryLoginUserCache loginUserCache() {
public CacheOperatorApi<LoginUser> loginUserCache() {
Long sessionExpiredSeconds = AuthConfigExpander.getSessionExpiredSeconds();
TimedCache<String, LoginUser> loginUsers = CacheUtil.newTimedCache(1000L * sessionExpiredSeconds);
return new MemoryLoginUserCache(loginUsers);
@ -143,7 +143,7 @@ public class GunsAuthAutoConfiguration {
*/
@Bean
@ConditionalOnMissingBean(name = "allPlaceLoginTokenCache")
public MemoryLoginTokenCache allPlaceLoginTokenCache() {
public CacheOperatorApi<Set<String>> allPlaceLoginTokenCache() {
TimedCache<String, Set<String>> loginTokens = CacheUtil.newTimedCache(CacheConstants.NONE_EXPIRED_TIME);
return new MemoryLoginTokenCache(loginTokens);
}