Skip to content
Snippets Groups Projects
Unverified Commit 5a4d4f9d authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Merge pull request #9197 from metabase/fix-max-cache-entry-size-setting

Make sure Max Cache Entry Size setting handles string inputs correctly
parents 36520708 32700730
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,10 @@
:type :integer
:default 1000
:setter (fn [new-value]
(when (> new-value global-max-caching-kb)
(when (and new-value
(> (cond-> new-value
(string? new-value) Integer/parseInt)
global-max-caching-kb))
(throw (IllegalArgumentException.
(str
(tru "Failed setting `query-caching-max-kb` to {0}." new-value)
......
......@@ -49,3 +49,10 @@
(i18n/with-user-locale zz
[(= zz (i18n/user-locale))
(tru "Host")])))
;; Make sure Max Cache Entry Size can be set via with a string value, which is what comes back from the API (#9143)
(expect
"1000"
;; use with temp value macro so original value gets reset after test run
(tu/with-temporary-setting-values [query-caching-max-kb nil]
(public-settings/query-caching-max-kb "1000")))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment