#1061 - findCount query is not cached in L2 query cache

This commit is contained in:
rob bygrave
2017-07-06 21:51:52 +12:00
parent 95aed6af54
commit 166bcd7c45
5 changed files with 38 additions and 3 deletions
@@ -70,7 +70,11 @@ public class DefaultOrmQueryEngine implements OrmQueryEngine {
public <T> int findCount(OrmQueryRequest<T> request) {
flushJdbcBatchOnQuery(request);
return queryEngine.findCount(request);
int result = queryEngine.findCount(request);
if (request.getQuery().isUseQueryCache()) {
request.putToQueryCache(result);
}
return result;
}
@Override