Cache config not taking effect

Version: 0.44.0 running in AWS Fargate.

Having enabled the cache config in Metabase we don''t see any queries being cached.

Observations:

  • Queries still take the same amount of time
  • The response headers do not indicate the query is returned from the cache
  • The query_cache table has no rows.

We tested queries against the Metabase database itself and our Athena database.

We verified that the SQL issued each time was the same and did not include any uuids or timestamps that may have prevented caching.

Cache config:

And associated Metabase logs:

2022-09-09 03:30:54,537 DEBUG middleware.log :: e[32mPUT /api/setting/enable-query-caching 204 15.3 ms (4 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (4 idle, 0 queued) (81 total active threads) Queries in flight: 0 (0 queued)e[0m

2022-09-09T11:35:48.271+08:00	2022-09-09 03:35:48,271 DEBUG middleware.log :: e[32mPUT /api/setting/query-caching-ttl-ratio 204 16.4 ms (4 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (4 idle, 0 queued) (84 total active threads) Queries in flight: 0 (0 queued)e[0m	MetabaseLogs/metabase/278e8bddaa01495e997aecaed05d93dd

2022-09-09T11:35:50.306+08:00	2022-09-09 03:35:50,306 DEBUG middleware.log :: e[32mPUT /api/setting/query-caching-min-ttl 204 17.2 ms (4 DB calls) App DB connections: 0/15 Jetty threads: 3/50 (4 idle, 0 queued) (84 total active threads) Queries in flight: 0 (0 queued)e[0m	MetabaseLogs/metabase/278e8bddaa01495e997aecaed05d93dd

Hi @steve.matthew
Post "Diagnostic Info" from Admin > Troubleshooting. Latest release is 0.44.2
You have not included any logs of question queries, so it's difficult to tell what is going on.
Metabase will only cache saved questions.

Thanks for the reply.

Metabase only caching saved questions was the key detail i was missing :slight_smile:

Verified that the cached results are returned when the question URL hit or reloaded via the browser.

I noted that the query is re-executed and not serviced from the cache when the replay icon is clicked:

@steve.matthew Correct, re-run a saved question will get updated results.