EntityCache优化

This commit is contained in:
redkale
2023-12-07 22:06:37 +08:00
parent 64c3a2c4bd
commit 6615326edb

View File

@@ -80,8 +80,8 @@ public final class EntityCache<T> {
private CompletableFuture<List<T>> loadFuture; private CompletableFuture<List<T>> loadFuture;
public EntityCache(final EntityInfo<T> info, final Cacheable c) { public EntityCache(final EntityInfo<T> info, final Entity c) {
this(info, c != null ? c.interval() : 0, c != null && c.direct()); this(info, c != null && c.cacheable() ? c.cacheInterval() : 0, c != null && c.cacheable() && c.cacheDirect());
} }
EntityCache(final EntityInfo<T> info, final int cacheInterval, final boolean cacheDirect) { EntityCache(final EntityInfo<T> info, final int cacheInterval, final boolean cacheDirect) {