![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
redis
黎子爱发呆
一名苦苦挣扎的程序员
展开
-
(三)Redis模糊匹配操作之scan
注:Jedis实现的具体操作方法会因版本问题略有差异,具体实现方法就具体版本修改 try (Jedis jedis = jedisPool.getResource()) { //模糊匹配的KEY String VEHICLE_MATCH_KEY = "user:info:*"; //结束点标识 String SCAN_CURSOR_INDEX = "0"; //一次扫描多少条数据 Integer SC原创 2020-11-24 16:16:32 · 802 阅读 · 0 评论 -
(二)使用redis管道实现批量写入和读取
protected void batchSetByPipelined(List<String> keys, List<String> values) { Jedis jedis = this.getJedisInstance(); try { Pipeline pip = jedis.pipelined(); for(int i = 0; ...原创 2020-04-22 20:53:40 · 1120 阅读 · 0 评论 -
使用RedisTemplate对redis进行独写操作
添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <!--非本地连接redis...原创 2019-10-11 17:01:40 · 236 阅读 · 0 评论