Merge remote-tracking branch 'upstream/v5-dev' into v5-dev

This commit is contained in:
lzpeng723 2020-12-04 21:13:57 +08:00
commit a142a6e4dc
3 changed files with 7 additions and 7 deletions

View File

@ -10,6 +10,7 @@
* 【core 】 multipart中int改为long解决大文件上传越界问题issue#I27WZ3@Gitee
### Bug修复
* 【cache 】 修复Cache中get重复misCount计数问题issue#1281@Github
-------------------------------------------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@ import java.util.concurrent.locks.StampedLock;
* 继承此抽象缓存需要<br>
* <ul>
* <li>创建一个新的Map</li>
* <li>实现 <code>prune</code> 策略</li>
* <li>实现 {@code prune} 策略</li>
* </ul>
*
* @param <K> 键类型
@ -30,11 +30,11 @@ public abstract class AbstractCache<K, V> implements Cache<K, V> {
private final StampedLock lock = new StampedLock();
/**
* 返回缓存容量<code>0</code>表示无大小限制
* 返回缓存容量{@code 0}表示无大小限制
*/
protected int capacity;
/**
* 缓存失效时长 <code>0</code> 表示无限制单位毫秒
* 缓存失效时长 {@code 0} 表示无限制单位毫秒
*/
protected long timeout;
@ -168,10 +168,8 @@ public abstract class AbstractCache<K, V> implements Cache<K, V> {
return null;
}
if (co.isExpired()) {
missCount.getAndIncrement();
} else {
// 命中
// 命中
if (false == co.isExpired()) {
hitCount.getAndIncrement();
return co.get(isUpdateLastAccess);
}

View File

@ -19,6 +19,7 @@ import java.sql.SQLException;
* @author Luxiaolei
*
*/
@FunctionalInterface
public interface RsHandler<T> extends Serializable{
/**