Skip to content

Commit

Permalink
fix: caching always enabled not caching queries (#10524)
Browse files Browse the repository at this point in the history
* Update SelectQueryBuilder.ts

fix #10500

* fix formatting

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
  • Loading branch information
krylovaaleksandra and pleerock committed Dec 29, 2023
1 parent ae006af commit 8af533f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/query-builder/SelectQueryBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3757,7 +3757,8 @@ export class SelectQueryBuilder<Entity extends ObjectLiteral>
undefined
const isCachingEnabled =
// Caching is enabled globally and isn't disabled locally.
(cacheOptions.alwaysEnabled && this.expressionMap.cache) ||
(cacheOptions.alwaysEnabled &&
this.expressionMap.cache !== false) ||
// ...or it's enabled locally explicitly.
this.expressionMap.cache
let cacheError = false
Expand Down

0 comments on commit 8af533f

Please sign in to comment.