mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix 修复 兼容redis5.0出现的问题
This commit is contained in:
		@@ -107,7 +107,11 @@ public class RedisUtils {
 | 
			
		||||
                bucket.setAndKeepTTL(value);
 | 
			
		||||
            } catch (Exception e) {
 | 
			
		||||
                long timeToLive = bucket.remainTimeToLive();
 | 
			
		||||
                setCacheObject(key, value, Duration.ofMillis(timeToLive));
 | 
			
		||||
                if (timeToLive == -1) {
 | 
			
		||||
                    setCacheObject(key, value);
 | 
			
		||||
                } else {
 | 
			
		||||
                    setCacheObject(key, value, Duration.ofMillis(timeToLive));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            bucket.set(value);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user