Commit d6cd3951 authored by Administrator's avatar Administrator

2025.1.9 RedisCache 模糊匹配和删除命令优化,同时优化mybatis的yml配置

parent 8ef96f6c
......@@ -42,7 +42,7 @@ public class SysUserOnlineController extends BaseController
@GetMapping("/list")
public TableDataInfo list(String ipaddr, String userName)
{
Collection<String> keys = redisCache.keys(CacheConstants.LOGIN_TOKEN_KEY + "*");
Collection<String> keys = redisCache.scanMatch(CacheConstants.LOGIN_TOKEN_KEY + "*");
List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
for (String key : keys)
{
......
......@@ -187,7 +187,7 @@ public class SysConfigServiceImpl implements ISysConfigService
@Override
public void clearConfigCache()
{
Collection<String> keys = redisCache.keys(CacheConstants.SYS_CONFIG_KEY + "*");
Collection<String> keys = redisCache.scanMatch(CacheConstants.SYS_CONFIG_KEY + "*");
redisCache.deleteObject(keys);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment