No way to clear cache ? (or TRUNCATE TABLE QUERY_CACHE ?)



I cannot find a way to clear the cache for all questions. This create very strange results for users seing old cached results.

Previous solution
As discussed in another topic, I managed to refresh some questions’ cache automatically.

But this only works for questions without filters. I am trying to find a robust way to clear the cache.

I connected to H2 (usingthis docker image), and run the query TRUNCATE TABLE QUERY_CACHE. This seems to clear the cache as expected. But I do not know if it will corrupt H2 database.

  • Is this a correct way to clear the cache ?
  • If yes, would it be possible to add it to Metabase interface ?

Many thanks


I finally manage to do it.
I first had to switch from H2 to Postgres as a backend (detailed script for our docker-compose setup)

Then you only have to TRUNCATE query_cache table (which is much easier with postgres…), then query all cards.