File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
hibernate-core/src/main/java/org/hibernate/query/sqm/internal Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -490,10 +490,16 @@ public boolean isQueryPlanCacheable() {
490
490
}
491
491
492
492
private SelectQueryPlan <R > resolveSelectQueryPlan () {
493
- final QueryInterpretationCache .Key cacheKey = createInterpretationsKey ( this );
494
- return cacheKey != null
495
- ? interpretationCache ().resolveSelectQueryPlan ( cacheKey , this ::buildSelectQueryPlan )
496
- : buildSelectQueryPlan ();
493
+ final QueryInterpretationCache queryCache = interpretationCache ();
494
+ if ( queryCache .isEnabled () ) {
495
+ final QueryInterpretationCache .Key cacheKey = createInterpretationsKey ( this );
496
+ return cacheKey != null
497
+ ? queryCache .resolveSelectQueryPlan ( cacheKey , this ::buildSelectQueryPlan )
498
+ : buildSelectQueryPlan ();
499
+ }
500
+ else {
501
+ return buildSelectQueryPlan ();
502
+ }
497
503
}
498
504
499
505
private QueryInterpretationCache interpretationCache () {
You can’t perform that action at this time.
0 commit comments