|
|
|
@ -107,8 +107,12 @@ public class RedisUtils {
|
|
|
|
|
bucket.setAndKeepTTL(value);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
long timeToLive = bucket.remainTimeToLive();
|
|
|
|
|
if (timeToLive == -1) {
|
|
|
|
|
setCacheObject(key, value);
|
|
|
|
|
} else {
|
|
|
|
|
setCacheObject(key, value, Duration.ofMillis(timeToLive));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
bucket.set(value);
|
|
|
|
|
}
|
|
|
|
|