小编hon*_*wei的帖子

为什么Spring-data-redis在缓存驱逐时使用keys命令

当我使用springboot时,我使用redis作为我的缓存服务器。但是我读了 spring-data-redis 源代码,当逐出缓存时,代码是

byte[][] keys = Optional.ofNullable(connection.keys(pattern)).orElse(Collections.emptySet())
                    .toArray(new byte[0][]);
Run Code Online (Sandbox Code Playgroud)

Redis 建议将keys 命令替换为scan 命令。为什么Spring团队不这样做呢?

redis spring-data-redis spring-boot

5
推荐指数
1
解决办法
1250
查看次数

标签 统计

redis ×1

spring-boot ×1

spring-data-redis ×1