How to empty all cache via API

Hi! I see in pricing page that advanced control on caching is a premium feature which is totally fine. But it should be a way to empty all cache via API I think. The endpoint complains even when I do not limit to any specific entity. Is it a bug or feature?

[d3de8758-4f2a-4fa4-8385-9115b4d53cc2] 2026-01-22T10:40:14+01:00 DEBUG metabase.server.middleware.log POST /api/cache/invalidate 402 1ms (0 DB calls) {:metabase-user-id 18} 
{:via
 [{:type clojure.lang.ExceptionInfo,
   :message
   "Granular Caching is a paid feature not currently available to your instance. Please upgrade to use it. Learn more at metabase.com/upgrade/",
   :data {:status-code 402, :status "error-premium-feature-not-available"},
   :at [metabase.premium_features.token_check$ee_feature_error invokeStatic "token_check.clj" 537]}],

Thanks a lot!

That should be a premium feature.

@randolph , but this is not any granular cache control as it is described in the pricing page. Wording is a bit ambiguous.

You can truncate the table in the database unless you’re using the hosted version.

I have seen people do that, but that is quite hacky solution I think. My “problem” is with just wording in the pricing page as it is not a granular cache control which is a premium feature. It would be nice to have it officially confirmed by someone from Metabase team.

From the Metabase perspective, it is granular cache control. All you have otherwise is the number of seconds to cache and the multiplier.

I do agree that it’s hacky. Only other option is to use Models and cache the model data. That can be refreshed on a timer. Not quite the same but can be useful.