List<String> list = new ArrayList<>(Lists.list( "key-not-exist1","key-not-exist2")); Long delete = redisTemplate.delete(list); System.out.println(delete);
redis批量删除时,如果删除不存在的key,不会报错,会返回已经成功删除的个数
List<String> list = new ArrayList<>(Lists.list( "key-not-exist1","key-not-exist2")); Long delete = redisTemplate.delete(list); System.out.println(delete);
redis批量删除时,如果删除不存在的key,不会报错,会返回已经成功删除的个数