Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

[QP] Move logging-only work inside the `log/*` call (#68362)

Braden Shepherdson9c8e505c9f35
diff --git a/src/metabase/query_processor/middleware/cache.clj b/src/metabase/query_processor/middleware/cache.clj
index aed4d9c95be..c89d52e5715 100644
--- a/src/metabase/query_processor/middleware/cache.clj
+++ b/src/metabase/query_processor/middleware/cache.clj
@@ -263,9 +263,8 @@
* The result *rows* of the query must be less than `query-caching-max-kb` when serialized (before compression)."
[qp :- ::qp.schema/qp]
(fn maybe-return-cached-results* [query rff]
- (let [cacheable? (is-cacheable? query)
- description (get-cache-eligibility-description query)]
- (log/tracef "Query is %scacheable: %s" (if-not cacheable? "not " "") description)
+ (let [cacheable? (is-cacheable? query)]
+ (log/tracef "Query is %scacheable: %s" (if-not cacheable? "not " "") (get-cache-eligibility-description query))
(if cacheable?
(run-query-with-cache qp query rff)
(qp query rff)))))