Skip to content

Commit

Permalink
fix condition mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Aug 22, 2024
1 parent b56f518 commit fb1e4c7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ private CacheResult PUT_caches(int lastIndex, K key, V value, long expire, TimeU
if (timeUnit == null) {
r = cache.PUT(key, value);
} else {
// 只有 isForce = 用户强制 && expire <= 本地缓存时间 才会使用参数的 expire
if (isForce && expire <= cache.config().getExpireAfterWriteInMillis()) {
// 只有 isForce = 用户强制 或者 expire <= 本地缓存时间 才会使用参数的 expire
if (isForce || expire <= cache.config().getExpireAfterWriteInMillis()) {
r = cache.PUT(key, value, expire, timeUnit);
} else {
r = cache.PUT(key, value);
Expand Down

0 comments on commit fb1e4c7

Please sign in to comment.