Browse Source

chore: cache up

master
wangxiang 2 years ago
parent
commit
006a6663f2
No known key found for this signature in database
GPG Key ID: 1BA7946AB6B232E4
  1. 6
      kicc-common/kicc-common-security/src/main/java/com/cloud/kicc/common/security/config/TokenStoreAutoCleanScheduleConfiguration.java

6
kicc-common/kicc-common-security/src/main/java/com/cloud/kicc/common/security/config/TokenStoreAutoCleanScheduleConfiguration.java

@ -22,13 +22,13 @@ import org.springframework.security.oauth2.config.annotation.web.configuration.A @@ -22,13 +22,13 @@ import org.springframework.security.oauth2.config.annotation.web.configuration.A
public class TokenStoreAutoCleanScheduleConfiguration {
/**
* 小时执行一致避免 redis zset 容量问题
* 天凌晨执行清除,避免 redis zSet 容量问题
*/
@Scheduled(cron = "@hourly")
@Scheduled(cron = "0 0 0 * * ?")
public void doMaintenance() {
KiccRedisTokenStore tokenStore = SpringContextHolderUtil.getBean(KiccRedisTokenStore.class);
long maintenance = tokenStore.doMaintenance();
log.debug("清理Redis ZADD 过期 token 数量: {}", maintenance);
log.debug("清理 Redis 过期 token 数量: {}", maintenance);
}
}

Loading…
Cancel
Save