Skip to content

Commit 8060e38

Browse files
author
Jonathan Hui
committed
Disable L1 cache
1 parent 99e1380 commit 8060e38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dao-impl/ebean-dao/src/main/java/com/linkedin/metadata/dao/EbeanLocalDAO.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import io.ebean.EbeanServer;
3939
import io.ebean.ExpressionList;
4040
import io.ebean.PagedList;
41+
import io.ebean.PersistenceContextScope;
4142
import io.ebean.Query;
4243
import io.ebean.SqlUpdate;
4344
import io.ebean.Transaction;
@@ -509,7 +510,8 @@ private <ASPECT extends RecordTemplate> EbeanMetadataAspect queryLatest(@Nonnul
509510
);
510511
}
511512

512-
results = query.findList();
513+
// disable L1 caching, then execute
514+
results = query.setPersistenceContextScope(PersistenceContextScope.QUERY).findList();
513515

514516
if (results.isEmpty()) {
515517
return null;

0 commit comments

Comments
 (0)