[英]In Guava cache what is the default value for refreshAfterWrite when creating a LoadingCache without providing it
What is the default value for refreshAfterWrite when creating a LoadingCache without providing it.在不提供的情况下创建 LoadingCache 时,refreshAfterWrite 的默认值是多少。
cache = CacheBuilder.newBuilder().build(new CacheLoader<Object, Object>() {
@Override
public Object load(Object o) throws Exception {
return getObj(o);
}
@Override
public ListenableFuture<Object> reload(Object o) throws Exception {
final ListenableFutureTask<Object> task = ListenableFutureTask.create(() -> {
return getObj(o);
});
executor.execute(task);
return task;
}
});
I see in the debug that the refreshAfterWrite is -1, but what does it means?我在调试中看到 refreshAfterWrite 为 -1,但这意味着什么? It means it will never reload?
这意味着它永远不会重新加载?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.