mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	修复reddison不能批量删除的bug。
This commit is contained in:
		@@ -96,8 +96,12 @@ public class RedisCache {
 | 
				
			|||||||
	 * @param collection 多个对象
 | 
						 * @param collection 多个对象
 | 
				
			||||||
	 * @return
 | 
						 * @return
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	public long deleteObject(final Collection collection) {
 | 
						public void deleteObject(final Collection collection) {
 | 
				
			||||||
		return redissonClient.getKeys().delete(Arrays.toString(collection.toArray()));
 | 
							RBatch batch = redissonClient.createBatch();
 | 
				
			||||||
 | 
							collection.forEach(t->{
 | 
				
			||||||
 | 
								batch.getBucket(t.toString()).deleteAsync();
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
 | 
							batch.execute();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user