Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Jan 16, 2025
1 parent 9b65365 commit 8cb5234
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2298,8 +2298,8 @@ public void putAll(Map<? extends K, ? extends V> map) {
if (node == null) {
node = nodeFactory.newNode(key, keyReferenceQueue(),
value, valueReferenceQueue(), newWeight, now);
setVariableTime(node, expireAfterCreate(key, value, expiry, now));
long expirationTime = isComputingAsync(value) ? (now + ASYNC_EXPIRY) : now;
setVariableTime(node, expireAfterCreate(key, value, expiry, now));
setAccessTime(node, expirationTime);
setWriteTime(node, expirationTime);
}
Expand Down Expand Up @@ -2688,8 +2688,8 @@ public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
weight[1] = weigher.weigh(key, newValue[0]);
var created = nodeFactory.newNode(key, keyReferenceQueue(),
newValue[0], valueReferenceQueue(), weight[1], now[0]);
setVariableTime(created, expireAfterCreate(key, newValue[0], expiry(), now[0]));
long expirationTime = isComputingAsync(newValue[0]) ? (now[0] + ASYNC_EXPIRY) : now[0];
setVariableTime(created, expireAfterCreate(key, newValue[0], expiry(), now[0]));
setAccessTime(created, expirationTime);
setWriteTime(created, expirationTime);
return created;
Expand Down Expand Up @@ -2724,15 +2724,11 @@ public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
n.setValue(newValue[0], valueReferenceQueue());
n.setWeight(weight[1]);

long expirationTime = isComputingAsync(newValue[0]) ? (now[0] + ASYNC_EXPIRY) : now[0];
setAccessTime(n, expirationTime);
setWriteTime(n, expirationTime);
setVariableTime(n, varTime);
if (isComputingAsync(newValue[0])) {
long expirationTime = now[0] + ASYNC_EXPIRY;
setAccessTime(n, expirationTime);
setWriteTime(n, expirationTime);
} else {
setAccessTime(n, now[0]);
setWriteTime(n, now[0]);
}

discardRefresh(k);
return n;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
caffeine = "3.1.8"
junit = "5.11.4"
reactor = "3.7.1"
reactor = "3.7.2"
truth = "1.4.4"
versions = "0.51.0"

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ auto-value = "1.11.0"
awaitility = "4.2.2"
bcel = "6.10.0"
bnd = "7.1.0"
bouncycastle-jdk18on = "1.79"
bouncycastle-jdk18on = "1.80"
cache2k = "2.6.1.Final"
caffeine = "3.1.8"
checkstyle = "10.21.1"
Expand Down

0 comments on commit 8cb5234

Please sign in to comment.