Skip to content

Commit

Permalink
Disable L1 cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Hui committed May 30, 2023
1 parent 99e1380 commit 8060e38
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import io.ebean.EbeanServer;
import io.ebean.ExpressionList;
import io.ebean.PagedList;
import io.ebean.PersistenceContextScope;
import io.ebean.Query;
import io.ebean.SqlUpdate;
import io.ebean.Transaction;
Expand Down Expand Up @@ -509,7 +510,8 @@ private <ASPECT extends RecordTemplate> EbeanMetadataAspect queryLatest(@Nonnul
);
}

results = query.findList();
// disable L1 caching, then execute
results = query.setPersistenceContextScope(PersistenceContextScope.QUERY).findList();

if (results.isEmpty()) {
return null;
Expand Down

0 comments on commit 8060e38

Please sign in to comment.